Files
30-seconds-of-code/snippets/current-URL.md
2017-12-17 17:55:51 +02:00

11 lines
187 B
Markdown

### currentURL
Returns the current URL.
Use `window.location.href` to get current URL.
```js
const currentURL = () => window.location.href;
// currentUrl() -> 'https://google.com'
```