0
Where is the error?
I want a red rectangle constantly moving around the screen https://code.sololearn.com/W4AAFNAXFS1q/?ref=app
5 Answers
+ 1
Stefano De Angelis
Write JS code inside this function
window.onload = function () {
}
+ 1
Stefano De Angelis
Not the phone issue.
JavaScript loads first before loading html contents.
+ 1
Stefano De Angelis
SoloLearn is different than web
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
0
A͢J On PC it worked without the function, so..