9 lines
161 B
Markdown
9 lines
161 B
Markdown
### Current URL
|
|
|
|
Use `window.location.href` to get current URL.
|
|
|
|
```js
|
|
const currentUrl = _ => window.location.href;
|
|
// currentUrl() -> 'https://google.com'
|
|
```
|