JS Built-ins
URLSearchParamsbeginner

URLSearchParams#delete() β€” removes entry

πŸ“– Usage Example
const p = new URLSearchParams('a=1&a=2')
p.delete('a', '1')
p.getAll('a')  // β†’ ['2']

Pass a second argument to delete() to remove only a specific value.

URLSearchParams#delete()

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

Challenge: Use delete() and verify the key is gone.

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