I encountered an issue where the map loop for slides was not working and I have yet to find a solution.
let slide = document.querySelectorAll('.slide');
//not working below
slide.map((s)=> s.onmousedown = slideFunction);
function slideFunction(){
alert('HI')
}
// working below
let num = [3,2,5,2];
num.map((n)=> alert(num));
The map loop is not functioning properly for each slide, but the numerical value array is working as expected.