get query params for current page javascript code example
Example: js get query param
const queryString = window.location.search;
const parameters = new URLSearchParams(queryString);
const value = parameters.get('key');
const queryString = window.location.search;
const parameters = new URLSearchParams(queryString);
const value = parameters.get('key');