how to get origin from url in js code example
Example 1: javascript origin url
const originString = url.origin
Example 2: javascript get origin url
console.log(window.location.origin);
const originString = url.origin
console.log(window.location.origin);