.sort with numbers code example
Example: javascript sort numbers
var numArray = [140000, 104, 99];
numArray.sort(function(a, b) {
return a - b;
});
// Array(3) [ 99, 104, 140000 ]
var numArray = [140000, 104, 99];
numArray.sort(function(a, b) {
return a - b;
});
// Array(3) [ 99, 104, 140000 ]