JS Built-ins
FormDatabeginner

FormData β€” has() returns false for missing key

πŸ“– Usage Example
const fd = new FormData()
fd.append('a', '1')
fd.delete('a')
fd.has('a')  // β†’ false

delete() removes all values associated with the given key.

FormData.has() β€” missing key

has(name) returns false when the key does not exist.

Challenge: Verify that has('missing') returns false on an empty FormData.

πŸ’‘ Hints (1)
  • β€’ An empty FormData has no keys, so has() returns false for any name