So, I'm very new to Javascript and I've been following this javascript30.com course and it's the first day.
I'm trying to wrap my head around that removeTransition function call. How is that valid and what exactly is getting passed as 'e'?
function removeTransition(e) {
if (e.propertyName !== "transform") return;
e.target.classList.remove("playing");
}
. .
const keys = Array.from(document.querySelectorAll(".key"));
keys.forEach((key) =>
key.addEventListener("transitionend", removeTransition)
);
removeTransitionfunction with the event listener for an event,transistionend. The browser event manager will invoke this function with an event (which the formal parameter,eof this function)