Why my addEventListener function/method is showing error? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Why my addEventListener function/method is showing error?

Hi I was practising for DOM manipulation. And in my js file I have a addEventListener .. it's showing error.. why? https://code.sololearn.com/WrCdug5Ajzp6/?ref=app

12th Jan 2020, 8:23 PM
Plaban Kr. Mondal
Plaban Kr. Mondal - avatar
1 Answer
+ 1
PLABAN Kr. MONDAL , you should load HTML before using it. Look at the code 🐱 https://code.sololearn.com/W420zSV4C3eS/?ref=app
12th Jan 2020, 8:36 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar