Skip to content

Latest commit

 

History

History
16 lines (12 loc) · 245 Bytes

currentURL.md

File metadata and controls

16 lines (12 loc) · 245 Bytes
title tags
currentURL
browser,url,beginner

Returns the current URL.

  • Use window.location.href to get the current URL.
const currentURL = () => window.location.href;
currentURL(); // 'https://www.google.com/'