Hi guys,
i really don’t get why on step 4 & 5 we use ‘note.onmousedown’ instead of the traditional way we were taught to add event handlers. My way does not work, this project has definitely confused me.
This is what I wrote below:
function keyEvents(note) {
note.addEventListener('mousedown', keyPlay);
note.addEventListener('mouseup', keyReturn);
}
I just don’t understand why we were taught one thing and have to switch it completely when a project comes up… can anyone advise?