My JavaScript isn't working. I am attempting to toggle the mobile menu. This is the console error message.
const button = document.getElementById('menu-button')
const nav = document.getElementById('menu')
function navToggle() {
button.classList.toggle('open')
nav.classList.toggle('hidden')
document.body.classList.toggle('no-scroll')
}
button.addEventListener('click', navToggle)