Files
30-seconds-of-code/snippets/currentURL.md
Angelos Chalaris 5c2eeb3bcc Updated examples
2017-12-27 16:06:16 +02:00

14 lines
195 B
Markdown

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