+ 4
I am trying to add a function to multiple <td> without having to actually write so many times addEventListener.
So I have the code below. I wrote in js some comments telling what is wrong and what I wanted to do. What is the best way to do that? https://code.sololearn.com/WPBLpTQ9I6H7/?ref=app
3 Respuestas
+ 2
There are a number of ways to accomplish what you want to do.
Here are a few:
https://code.sololearn.com/Wj6qOjBdmkWv/#js
https://code.sololearn.com/WHu19OeFHd2l/#js
https://code.sololearn.com/Wj0VhUv24KoE/#js
https://code.sololearn.com/WOR2DvWaLF9d/#js
reference MDN web docs
+ 3
Alex Tusinean
My apologies for the delay response.
I refactored the code in question I believe it makes the code easier to follow.
If not let me know.
https://code.sololearn.com/WUaiNiQmAP6n/#js
+ 2
ODLNT can you please explain this code a little more?
https://code.sololearn.com/WHu19OeFHd2l/?ref=app