Here we have a code snippet sourced from the 30 seconds of code website. This example, intended for beginners, has left me feeling stumped.
The question arises:
const currentURL = () => window.location.href;
Why complicate things when you could just do this instead?
const currentURL = window.location.href;