This one-liner sorts a numerical javascript array.

1
2
// replace ARRAY_NAME with the name of your array.
ARRAY_NAME.sort(function(a,b) { return a-b; });