0
JavaScript
I am trying to code a red circle I keep getting a syntax error ânull is not an objectâ Here is my JavaScript code: 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(); Here is my html code: <canvas id = âcanvasâ height = â400â width = â600â> </canvas>
3 Answers
+ 4
Use âMath.PIâ
instead of âMath.Piâ
+ 1
I tried that but it still didnât work but thank you for your help
+ 1
I solved it finally