¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita0
game development with javascript question
both of these seem to be identical but the one on the top doesn't produce a red circle like the one on the bottom does and I cant seam to figure out why. The bottom code was copy and pasted from the code repo and the one on top I typed out myself. 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(); 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();
3 Respuestas
+ 4
Syntax error: fillstyle on the first one
0
Wow thank you!
0
PI is typed as Pi in the top one