+ 1

Why this code is not working in sololearn

This code is working in my pc but it is not working in sololearn. It shows addeventlistner is not working, please help https://code.sololearn.com/Wz141DT01akj/?ref=app

5th Feb 2022, 11:19 AM
Mohit
Mohit - avatar
3 Answers
+ 3
Read this post to get a better understanding about this issue. https://www.sololearn.com/post/90825/?ref=app And you have a typo writing "cacnum" while there should be "calnum" btn.addEventListener('click', cacnum);
5th Feb 2022, 11:36 AM
Ipang
+ 2
In your javascript line no - 13 calnum spelling is wrong. your - btn.addEventListener('click', cacnum); should be - btn.addEventListener('click', calnum);
5th Feb 2022, 11:40 AM
Shaurya Kushwaha