1const params = new URLSearchParams(window.location.search);
2
3// Check if we have the param
4if (params.has("myParam")) {
5 console.log("Yep! We have it. Value is: " + params.get("myParam"));
6} else {
7 console.log("The param myParam is not present.");
8}
1const queryString = window.location.search;
2const urlParams = new URLSearchParams(queryString);
3const code = urlParams.get('code')