JavaScript console | SoloLearn: Learn to code for FREE!


JavaScript console

Why EventListener is not working in JS section of SoloLearn PlayGround

5/29/2018 8:54:04 AM

Gopi Chand

4 Answers

New Answer


I think Hatsy Rei meant to post the link of your code with the question. Anyways, I checked your code and found the solution :D and that is "Wrap your JS code in a window.onload function" Example ~ window.onload = function (){ // all code here } Also note that you didn't define the "btn" variable for the anything so it will show errors


Post your code here so that the community can try to help you debug your stuff?


Thanks a lot Nikhil :)