Why my addEventListener() is not working? While the same code is working on onClick() event... | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Why my addEventListener() is not working? While the same code is working on onClick() event...

I am feeling like a looser ๐Ÿ˜”.. because everytime I got error when I write something.... Here are the 2 code: https://code.sololearn.com/WtTZiqef4847/?ref=app https://code.sololearn.com/WvLpbP5qY2kr/?ref=app

19th Dec 2022, 7:13 AM
Pooja Sahoo
Pooja Sahoo - avatar
3 Answers
+ 4
Line 23 - you wrote "click" wrong
19th Dec 2022, 8:25 AM
๐Ÿ‡ Alex Tuศ™inean ๐Ÿ’œ
๐Ÿ‡ Alex Tuศ™inean ๐Ÿ’œ - avatar
+ 2
Thanks for finding my error.๐Ÿ˜Œ ... I check all spellings for about more than 20 times ... But I couldn't find my spelling error.. Thank you so much ๐Ÿ˜‡ Alex Tusinean .. for your help ๐Ÿ˜Š
19th Dec 2022, 9:10 AM
Pooja Sahoo
Pooja Sahoo - avatar
+ 1
There are code linters and online validators for JavaScript. I strongly recommend using them. Besides finding errors which escape human eyes, they also teach. I learn a lot with them.
20th Dec 2022, 2:13 AM
Emerson Prado
Emerson Prado - avatar