URLSearchParams.get()
The get()
method of the URLSearchParams
interface returns the first value associated to the given search parameter.
Syntax
Parameters
name
- : The name of the parameter to return.
Return value
A string if the given search parameter is found; otherwise,
null
.