Skip to main content

has

method URLSearchParams.prototype.has
Jump to headingURLSearchParams.prototype.has(
name: string,
value?: string,
): boolean

Checks if the URLSearchParams object contains key-value pair(s) based on name and an optional value argument.

If value is provided, returns true when name-value pair with same name and value exists.

If value is not provided, returns true if there is at least one name-value pair whose name is name.

Parameters Jump to heading

Jump to headingname: string
optional
Jump to headingvalue: string

Return Type Jump to heading

boolean
Back to top