Programming Exercises

Use <canvas> to draw a basic rectangle or line on the screen.

Hard

Problem Statement

Use to draw a basic rectangle or line on the screen.

Sample Input

A canvas with a basic shape.

Sample Output

The webpage displays a rectangle or line drawn on a canvas.

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
<!doctype html> <html></html>
Log in or sign up to run or submit your code.Log inSign up
Input
A canvas with a basic shape.
Expected Output
The webpage displays a rectangle or line drawn on a canvas.