Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis0
What is the purpose of e in this function parameter ? Please help.
I should be able to use clientX directly instead of e.clientX shouldn't I ? --here is the code -- document.addEventListener("mousemove",function(e){ console.log(e.clientX); });
4 Respostas
+ 2
The parameter (e) is automatically passed fromĀ javascriptĀ to youĀ functionĀ when you add an event listener. It represents the element that was affected, an example would be the button element that was clicked
0
I don't understand
0
I didn't declare e...it should be working without parameter
0
Thanks for helping