<canvas id="myCanvas" width="400" height="400"></canvas>
var canvas = document.getElementById('myCanvas')
if (canvas.getContext) {
  let ctx = canvas.getContext('2d')
  ctx.beginPath();
  for (let i = 0; i < 10; i++) {
    ctx.moveTo(10,30 + i * 10)
    ctx.lineTo(100,30 + i * 10)
    ctx.closePath()
    ctx.stroke()
  }
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.