I’m trying to remove the event listener that I’ve added in for loop but it didn’t work
Is there a way to do this with pure js?
for (let i = 0; i < drumPads.length; i++) {
drumPads[i].addEventListener("click", func)
function func() {
display.innerHTML = music[i][0];
sound.src = music[i][1];
sound.play();
}
}