+ 4

Why it make's error for function ok() in line : 41

https://code.sololearn.com/Wg6U037TtSlJ/?ref=app

17th Mar 2018, 11:47 AM
Sina
Sina - avatar
7 Réponses
+ 4
x.style.backgroundColor = document....
17th Mar 2018, 12:03 PM
Amar
Amar - avatar
+ 3
What does the error say? Also it gave me an error in line 42.
17th Mar 2018, 12:05 PM
Alper Tiryakioğlu
Alper Tiryakioğlu - avatar
+ 2
Also you variable x is local, which means it can only be used in that function, and not outside of it. Can't say for sure but it also could be a problem.
17th Mar 2018, 12:07 PM
Amar
Amar - avatar
+ 2
Did my answer solve your problem?
17th Mar 2018, 2:54 PM
Amar
Amar - avatar
+ 1
I want that it be local no problem thanks
17th Mar 2018, 1:04 PM
Sina
Sina - avatar
+ 1
Yes thanks
17th Mar 2018, 3:17 PM
Sina
Sina - avatar
0
No problem, good luck.
17th Mar 2018, 3:57 PM
Amar
Amar - avatar