JSFiddle - React, Tailwind, and code Playground
by gRoberts
HTML
<canvas id="myCanvas" width="200" height="200" style="border:1px solid #000000;">
Your browser does not support the canvas element.
</canvas>
JavaScript
var c=document.getElementById("myCanvas");
var cxt=c.getContext("2d");
var width=200;
var height=200;
var i=0;
for (i = -5; i < 5; i++)
{
cxt.moveTo(100,0);
cxt.lineTo((i + 5)*22,50);
cxt.stroke();
cxt.moveTo(100,150);
cxt.lineTo((i + 5)*22,50);
cxt.stroke();
}