SOURCE

var arr = [10,5,40,25,100,1];

function sortNumber(a,b){
  	return a-b;
}

alert(arr);
alert(arr.sort(sortNumber));
console 命令行工具 X clear

                    
>
console