window.addEventListener("load", () => { const sounds = document.querySelectorAll(".sound"); const pads = document.querySelectorAll(".line div"); const colors = [ "#60d394", "#d36060", "#c060d3", "#d3d160", "#606bd3", "#60c2d3" ]; pads.forEach((pad, index) => { pad.addEventListener("click", function() { sounds[index].currentTime = 0; sounds[index].play(); createBubble(index); }); }); });