Property:
miterLimit:

The miter length is the distance between the inner corner and the outer corner where two lines meet.

If the miter length exceeds the miterLimit value, the corner will be displayed as lineJoin type "bevel".

Canvas:
your browser does not support the canvas tag
Code:
var c=document.getElementById('myCanvas');
var ctx=c.getContext('2d');
ctx.lineWidth=10;
ctx.lineJoin='miter';
ctx.miterLimit=10;
ctx.moveTo(20,20);
ctx.lineTo(50,30);
ctx.lineTo(20,40);
ctx.stroke();
Click the property values above to see the result
w3ii.com - Play it