Can anyone help me with this code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can anyone help me with this code?

https://code.sololearn.com/WTGdR88j8lNZ/?ref=app I don't know why there is ERROR in my code

25th Apr 2023, 12:39 PM
zain Shendy
2 Answers
+ 4
Read the error message carefully: You did not define any variable or constant with the name "Context". Hence it is unclear what "Context" refers to.
25th Apr 2023, 12:46 PM
Lisa
Lisa - avatar
0
zain Shendy You may work with canvas, first of all you need to create a <canvas> with a specific width and height and id, then select the canvas with its I'd and save to your Context variable. Remember onclick event is not work as write it, the event should capture throw an event listener call back function.
25th Apr 2023, 1:28 PM
Yasin Rahnaward
Yasin Rahnaward - avatar