The code snippet below is from 30 seconds of code website. This is a beginner example which embarrassingly has me stumped.
Why do this:
const currentURL = () => window.location.href;
When you can simply do this?
const currentURL = window.location.href;