Web APIs
URLSearchParams.delete()
Remove pairs matching the name; if value is supplied, remove only pairs matching both name and value. Example console output: tag=b.
Formal Syntax & Structure
javascript syntaxjavascript
params.delete(name[, value])Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| name | string | Parameter name. |
| value | string | Specific matching value. |
Return Value
undefined
No result value.
Working Example
Example Snippetjavascript
const p=new URLSearchParams("tag=a&tag=b&tag=a"); p.delete("tag","a"); console.log(p.toString());