Two reasons why I would not use a variable here:

- path variable inside path function
- `window.location.pathname` is explicit already