Skip to main content
URLSearchParams.append - URL - Web documentation
method URLSearchParams.append
URLSearchParams.append(
name: string,
value: string,
): void

Appends a specified key/value pair as a new search parameter.

let searchParams = new URLSearchParams();
searchParams.append('name', 'first');
searchParams.append('name', 'second');

Parameters

name: string
value: string

Return Type

void