0

Where is the error?

I want a red rectangle constantly moving around the screen https://code.sololearn.com/W4AAFNAXFS1q/?ref=app

5th May 2022, 8:46 AM
Stefano De Angelis
Stefano De Angelis - avatar
5 odpowiedzi
+ 1
Stefano De Angelis Write JS code inside this function window.onload = function () { }
5th May 2022, 8:53 AM
A͢J
A͢J - avatar
+ 1
Stefano De Angelis Not the phone issue. JavaScript loads first before loading html contents.
5th May 2022, 10:00 AM
A͢J
A͢J - avatar
+ 1
Stefano De Angelis SoloLearn is different than web
5th May 2022, 3:12 PM
A͢J
A͢J - avatar
0
A͢J Thank you, on computer the code worked fine. I think phones are slower so they need to load the canvas correctly before working
5th May 2022, 9:51 AM
Stefano De Angelis
Stefano De Angelis - avatar
0
A͢J On PC it worked without the function, so..
5th May 2022, 10:35 AM
Stefano De Angelis
Stefano De Angelis - avatar