Answers for "javascript get token from query string"

0

javascript get token from query string

const queryString = window.location.search;
console.log(queryString);
// ?product=shirt&color=blue&newuser&size=m
Posted by: Guest on September-22-2021
0

javascript get token from query string

const urlParams = new URLSearchParams(queryString);
Posted by: Guest on September-22-2021
-1

javascript get token from query string

const product = urlParams.get('product')
console.log(product);
// shirt

const color = urlParams.get('color')
console.log(color);
// blue

const newUser = urlParams.get('newuser')
console.log(newUser);
// empty string
Posted by: Guest on January-28-2021

Code answers related to "javascript get token from query string"

Code answers related to "Javascript"

Browse Popular Code Answers by Language