Node.js examples for Algorithm:Sort
Sort list of numbers
function mySort() { var tags = new Array(); tags=Array.prototype.slice.call(arguments); tags.sort(function(a,b){ return a-b; });//from ww w . j av a 2 s. c o m return tags; } var result = mySort(50,11,16,32,24,99,57,100); console.log(result);