function menu() { const menuElement = document.getElementById("menu") const menuOpenElement = document.getElementById("menuOpen") const menuCloseElement = document.getElementById("menuClose") menuOpenElement.addEventListener('click', function () { console.log("open") menuElement.classList.toggle('hidden') }) menuCloseElement.addEventListener('click', function () { console.log("close") menuElement.classList.toggle('hidden') }) } function launch() { menu() } launch()