javascript window location search parameter params to string code example
Example 1: get query param javascript
const urlParams = new URLSearchParams(window.location.search);
const myParam = urlParams.get('myParam');
Example 2: js query string
const urlParams = new URLSearchParams(window.location.search);
const myParam = urlParams.get('myParam');