location.pathname is undefined
https://codepen.io/gsadopkgj/pen/oNJKxQR (i've put in the appropriate for the object property names - they now match the location.pathname)



let path = location.pathname doesn't do anything to location.pathname, it just stores the value (or lack thereof) in the path variablesections array
sections[path][currentOption] to sections[currentOption][path]||