var fruit=[7,10,32,6,9,4];
document.write(fruit+'
');
fruit.sort(sortFun);
document.write(fruit);
function sortFun(ar1,ar2){
if(ar1>ar2){
return 1;
}else if(ar1
这段代码是怎么让数组元素排列的呢? 求大神详细的讲解下 感谢感谢
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
学习是最好的投资!