Too Long; Didn't Read
JavaScript has a basic sorting function available on Array objects and running it will probably do what you expect. The default JavaScript sorting algorithm is to convert all members of an array to strings and then compare their sequences of UTF-16 code unit values. This works great for arrays of several numbers, but it breaks down very quickly for some numbers. The biggest problem is when the keys may be ignored and sorted to the end of the array. There are a few ways around this, but the important thing is knowing that it can happen.