<!
DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Draw Object in JavaScript</title>
</head>
<body>
<!-- Canvas area -->
<canvas id="myCanvas" width="400" height="300" style="border:1px
solid #000000;"></canvas>
<script>
// Get the canvas element and its drawing context
const canvas = [Link]('myCanvas');
const ctx = [Link]('2d');
// Draw a rectangle
[Link] = "lightblue";
[Link](50, 50, 100, 60); // (x, y, width, height)
// Draw a line
[Link]();
[Link](50, 150);
[Link](200, 150);
[Link] = "red";
[Link] = 3;
[Link]();
// Draw a circle
[Link]();
[Link](250, 100, 40, 0, 2 * [Link]);
[Link] = "green";
[Link]();
[Link] = "black";
[Link]();
</script>
</body>
</html>