We can get the domain name from the url in js by using the URL API object, Split() method, and Regular Expressions.

seen from Canada
seen from Australia
seen from China
seen from China
seen from T1
seen from United States

seen from United States
seen from Japan
seen from China
seen from United States
seen from Brazil
seen from China
seen from China

seen from Japan
seen from Germany

seen from United States
seen from Germany
seen from United States

seen from United States
seen from Japan
We can get the domain name from the url in js by using the URL API object, Split() method, and Regular Expressions.
Destructuring JavaScript Objects
Destructuring is a huge part of ES6. This post is a simple introduction to what destructuring actually is and how to destructuring JavaScript Objects. (more…)
View On WordPress