0

How do I fix this error?(js , canvas)

hello. this is my code. How do I fix this error? https://code.sololearn.com/WymV2uKcYPQ6/?ref=app https://code.sololearn.com/WymV2uKcYPQ6/?ref=app thanks for help🌹

30th Jan 2021, 9:39 PM
maydrt
maydrt - avatar
3 Respuestas
+ 3
The js code is running before the document loads,. so you need to wait untill the page loads and then run the js code. window.onload = () => { //your code }
30th Jan 2021, 9:50 PM
Med Amine Fh
Med Amine Fh - avatar
+ 2
Welcome
30th Jan 2021, 9:53 PM
Med Amine Fh
Med Amine Fh - avatar
+ 1
thanks🌹
30th Jan 2021, 9:52 PM
maydrt
maydrt - avatar