0

Another mistake with my code

There an error at line 14 and I have no idea what it is because Iā€™m new to coding https://code.sololearn.com/WJ8PMSOr31Cb/?ref=app

30th Jan 2022, 6:14 AM
Matthew Evans
3 Answers
+ 1
You misspelled the btn variable on line 14
30th Jan 2022, 6:24 AM
Moshe Schnitzler
Moshe Schnitzler - avatar
+ 1
It's because your btn is out of scope U are declaring btn inside window.onload so u cannot use btn outside onload function , it's out of scope
30th Jan 2022, 6:34 AM
Pariket Thakur
Pariket Thakur - avatar
0
I changed bnt to btn but now it says it can find variable bnt on line 14
30th Jan 2022, 6:29 AM
Matthew Evans