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