d
Amit DhamuSoftware Engineer
 

Get Query Parameters

1 minute read 00000 views
const url = new URL('http://www.google.co.uk?lang=en&q=foo')

console.log(url.searchParams);

// Result
{
    lang: 'en',
    q: 'foo'
}