JS Built-ins
URLSearchParamsbeginner

URLSearchParams#delete() β€” non-existent key is no-op

πŸ“– Usage Example
const p = new URLSearchParams()
p.append('tag', 'js')
p.append('tag', 'ts')
p.getAll('tag')  // β†’ ['js', 'ts']

Use append() repeatedly to build multi-value parameters.

URLSearchParams#delete() β€” no-op

Deleting a key that does not exist does nothing and throws no error.

Challenge: Verify that deleting a missing key is safe.

πŸ’‘ Hints (1)
  • β€’ delete() is always safe to call, even for keys that do not exist