Example 1 — Quick demo
Core Location.
JavaScript
console.log(typeof location);
console.log("location.pathname / location.search / location.hash");How It Works
- Parts. pathname, search, hash.
- Navigate. Assign location.href.
location represents the current page URL—read href, pathname, search, or assign to navigate.
| Topic | Summary |
|---|---|
basics | core Location usage. |
window.location | existing property tutorial. |
console.log(typeof location);
console.log("location.pathname / location.search / location.hash");Core Location.
console.log(typeof location);
console.log("location.pathname / location.search / location.hash");CODETOFUN NEWS
Get the latest IT news, programming updates, and technology trends directly on your phone.
Your daily dose of tech, straight to your feed.
6 people found this page helpful