URL
URLSearchParams.getAll()
Returns every query value for a name, preserving their sequence. Missing names produce an empty array; an explicitly empty value is an empty string.
Formal Syntax & Structure
nodejs syntaxnodejs
params.getAll(name)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| name | string | Query parameter name. |
Return Value
string[]
All matching values.
Working Example
Example Snippetnodejs
const params = new URLSearchParams("tag=new&tag=sale");console.log(params.getAll("tag"));