Prev Demo
Stroke Rect()
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <body> <canvas id="myCanvas" width="200" height="100" style="border:4px solid yellow;"> </canvas> <script> var a = document.getElementById("myCanvas"); var b = a.getContext("2d"); b.strokeRect(40, 10, 50, 80); </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output