const navLink = document.querySelectorAll(".nav-link");
navLink.forEach((link) =>
link.addEventListener("click", () => {
ul.classList.remove("show");
})
);
I'm trying to understand the logic behind the forEach in this scenario, I'm new to javascript and programming in general and it's been a challenge to be able to translate what I want into a programing language.
I read different posts regarding forEach syntax but it's truly a lot of technical there and I wasn't able to quite catch their meaning.