Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<body>
<canvas id="myCanvas1" height = 400 width="800">Your browser does not support the canvas tag.</canvas>
<script type="text/javascript">
    var canvas=document.querySelector('#myCanvas1');
    var context=canvas.getContext('2d');
    context.beginPath();
    context.moveTo(100, 20);
    context.lineTo(200, 160);
    context.quadraticCurveTo(230, 200, 250, 120);
    context.bezierCurveTo(290, -40, 300, 200, 400, 150);
    context.lineTo(500, 90);
  // TRY TO UNCOMMENT THIS LINE
  //context.closePath();
    context.lineWidth = 5;
    context.strokeStyle = "#0000ff";
    context.stroke();
</script>
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers