Set the line join style

ctx.lineWidth = ;

ctx.lineJoin = ;

ctx.beginPath();

ctx.moveTo(, );

ctx.lineTo(, );

ctx.lineTo(, );

ctx.lineTo(, );

ctx.stroke();

Show the path

Change the lineJoin value to see how this affects how the path is drawn on the <canvas>. To highlight the differences, increase the lineWidth and then focus on the two corners formed by the lines.