This is the correct way to do this: http://jsfiddle.net/8QHFe/153/
var linePts = [
[ 31.811628, 24.904771 ],
[ 31.810856, 24.91096 ],
[ 31.817636, 24.911855 ],
[ 31.831133, 24.907477 ],
[ 31.841497, 24.898679 ],
[ 31.841025, 24.895312 ],
[ 31.837935, 24.891225 ],
[ 31.842356, 24.889006 ],
[ 31.853814, 24.888626 ]
];
// a FOR loop operates on each item in a list
for( i=0; i < linePts.length; i=i+1 ) {
// turn this coordinate into a LatLng
linePts[ i ] = new L.LatLng( linePts[ i ][ 0 ], linePts[ i ][ 1 ] );
}
// add the line
line = new L.Polyline( linePts, { color: "purple" } );
map.addLayer(line);