Issue w/ my code on JS for Games | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Issue w/ my code on JS for Games

So it appears that no matter how many times I input the Javascript Code provided in the JS For Games section on circles - it appears that I keep getting an "error". Here is the code in question - what exactly is wrong w/ it OR is it a bug? var canvas = document.getElementById("canvas"); var context = canvas.getContext("2d"); var x = 300; var y = 350; context.arc(x, y, 50, 0, 2*Math.PI); context.fillStyle = "red"; context.fill();

16th Apr 2022, 5:03 AM
Conor Climo
Conor Climo - avatar
6 Answers
+ 2
Yes
16th Apr 2022, 5:53 AM
Jalaj Madaan
Jalaj Madaan - avatar
+ 1
I inserted it outside the window - OH I was supposed to put that in the window function, right BroFar?
16th Apr 2022, 5:50 AM
Conor Climo
Conor Climo - avatar
+ 1
Just did it. Lol. Still got a long way to go.
16th Apr 2022, 5:54 AM
Conor Climo
Conor Climo - avatar
0
Could you tell which error you're getting?
16th Apr 2022, 5:48 AM
Jalaj Madaan
Jalaj Madaan - avatar
0
Conor Climo so that we can help you better can we see the rest of your code? There was a specific location in the JS script where that was suppose to be inserted.
16th Apr 2022, 5:49 AM
BroFar
BroFar - avatar
0
Same here man, I remember missing so many small details and messing up the whole code.
16th Apr 2022, 5:54 AM
Jalaj Madaan
Jalaj Madaan - avatar