New course! Every coder should learn Generative AI!
Try a free lesson0
What is problem with my code
I tried many ways but I couldn't find the problem can you guys please help me https://code.sololearn.com/W4AKSDr2s2T8/?ref=app
2 Answers
+ 4
There's a bunch wrong, but to start with:
* Wrap everything inside window.onload to avoid scope problems
* Delete the duplicate button.onclick definition
* Add an initializing request for animation frame, inside onload but outside of draw
That should be enough to get you on the right track.