I have faced with strange sorting result in Javascript for numeric arrays. For example result of sorting [1,2,10,20,100,200]:
> [1, 2, 10, 20, 100, 200].sort()
[ 1, 10, 100, 2, 20, 200 ]
Why it's happening?
It seems what the array sort cannot be used for sorting numeric arrays directly?