+ 1

When i tried this code, it didn't work context.rect(50,50,100,50); context.stroke();

15th Oct 2022, 10:36 AM
Abigail Quansah
Abigail Quansah - avatar
2 Respuestas
+ 1
You may get more help if you post the code or link to the tutorial you're referencing.
15th Oct 2022, 10:51 AM
James Tadeo
James Tadeo - avatar
0
Your code is incomplete. You need the <canvas> tag And a script for the code. HTML <canvas id="canvas"></canvas> JS const canvas = document.getElementById("canvas"); const context = canvas.getContext("2d"); context.rect(50, 50, 100, 50); context.stroke();
15th Oct 2022, 11:41 PM
Chris Coder
Chris Coder - avatar