0

When I copy and paste output was done but when I type but the output was error what my mistake

<html> <head> <meta charset="utf-8"> <title>Untitled Document</title> </head> <body> <canvas id="myCanvas" width="500" height="500" style="border-color:brown;border-style:solid”> </canvas> <script> var c = document.getElementById("myCanvas"); var ctx = c.getContext("2d"); ctx.fillStyle="#00ff00"; ctx.fillRect (10,10,200,200); ctx.fillStyle="blue"; ctx.fillRect (100,100,200,200); ctx.beginPath(); ctx.moveTo (150,150); ctx.lineTo (150,300); ctx.lineTo (300,300); ctx.lineTo (150,150); ctx.fillStyle="red"; ctx.fill(); ctx.closePath(); </script> </body> </html>

11th Mar 2023, 5:07 PM
Shobana Bommi
Shobana Bommi - avatar
1 Antwort
+ 4
Please LINK your code instead of pasting it into the description. Please put "Javascript" in the tag section. PLEASE DO NOT RE-POST THE SAME QUESTION.
11th Mar 2023, 5:09 PM
Lisa
Lisa - avatar