JS Built-ins
FormDatabeginner

FormData β€” delete() removes a key

πŸ“– Usage Example
const fd = new FormData()
fd.set('x', 'old')
fd.set('x', 'new')
fd.get('x')  // β†’ 'new'

set() replaces all existing values for a key with a single new value.

FormData.delete()

delete(name) removes all entries with the given name.

Challenge: Append 'k', delete it, then verify has('k') returns false.

πŸ’‘ Hints (1)
  • β€’ delete() removes ALL entries for that name, not just the first one