0

HELP HELP HELP ,please help me debugging my code(web) .It worked fine in my laptop but failed in sololearn web ide

https://code.sololearn.com/W2dEuHxzk2vC/?ref=app This code is simple color guessing game in which you have to guess a color using its rgb value from the 6 randomly generated colors .The html and css part was successfully done and executed but the js part was not even generate random colors for me. Although this code successfully run in my laptop

1st Sep 2017, 5:28 PM
Praful Kumar
Praful Kumar - avatar
4 ответов
+ 5
Wrap your entire JS in this function: window.onload=function(){ //Your entire JS goes in here }
1st Sep 2017, 5:35 PM
Ghauth Christians
Ghauth Christians - avatar
+ 1
@Gavin thanks a lot Gavin for helping me .Really it works now but there is still a bug in it as my play again button never work .It is still not responsive . Can u please tell me the solution for that .. And Once again THANK YOU SO MUCH..
1st Sep 2017, 6:45 PM
Praful Kumar
Praful Kumar - avatar
+ 1
ok i got it @Gavin actually there is a space after touchstart listener in reset button like this "touchstart ",function() but now i successfully debug it
1st Sep 2017, 6:54 PM
Praful Kumar
Praful Kumar - avatar
+ 1
Glad you figured it out. ☺
1st Sep 2017, 6:55 PM
Ghauth Christians
Ghauth Christians - avatar