0

My event listener won't work

I keep getting an error whenever i write the addEventListener. Considers it null. What am i missing? https://code.sololearn.com/WSh1xoCXgela/?ref=app

20th Aug 2020, 2:06 PM
Dee
2 Answers
+ 3
https://www.sololearn.com/post/90825/?ref=app https://www.sololearn.com/discuss/2452002/?ref=app
20th Aug 2020, 2:09 PM
šŸ‡®šŸ‡³OmkaršŸ•‰
šŸ‡®šŸ‡³OmkaršŸ•‰ - avatar
0
Try document.onload = () => { //Js code here }
20th Aug 2020, 4:07 PM
Divya Mohan
Divya Mohan - avatar