Core code:
$(function(){
var can = $("#can").get(0);
var txi = can.getContext("2d");
txi.beginPath();
txi.moveTo( 105,105);
txi.lineTo(105,45);
txi.lineTo(45,105);
txi.closePath();
txi.stroke();
txi.beginPath( );
txi.moveTo(25,25);
txi.lineTo(100,25);
txi.lineTo(25,100);
txi.stroke();
})
closePath(); Close the path
The picture below is one that uses, close, One is useless: