Shape recognition

Report a typo

Below is a snippet of code that draws a certain shape on the canvas. Find out the shape that the code below outputs and choose the correct answer.

<!DOCTYPE html>
<html>
<body>

<canvas id="canvas" width="150" height="130" style="border:1px solid #d3d3d3;">
Your browser does not support the HTML canvas tag.</canvas>

<script>
const canvas = document.getElementById("canvas");
const ctx = canvas.getContext("2d");
    ctx.strokeRect(50, 50, 50, 50);
</script> 

</body>
</html>
Select one option from the list
___

Create a free account to access the full topic