Files
30-seconds-of-code/snippets/current-URL.md
Angelos Chalaris 43f8529cb9 Added samples
2017-12-12 17:50:08 +02:00

161 B

Current URL

Use window.location.href to get current URL.

const currentUrl = _ => window.location.href;
// currentUrl() -> 'https://google.com'