function
mySort() {
var
tags =
new
Array();
for
(
var
i = 0;i < arguments.length;i++) {
tags.push(arguments[i]);
}
tags.sort(
function
(compare1,compare2) {
return
compare1- compare2;
});
return
tags;
}
var
result = mySort(50,11,16,32,24,99,57,100);
alert(result);
时间: 2024-10-06 11:14:57