标签:lang asc javascrip i++ 选择 sort func pre class
function selectSort(arr){
for (let i = 0; i < arr.length; i++) {
for (let j = i ; j < arr.length; j++){
if (arr[i] > arr[j]) {
let tem = arr[i];
arr[i] = arr[j];
arr[j] = tem;
}
}
}
}
标签:lang asc javascrip i++ 选择 sort func pre class
原文地址:https://www.cnblogs.com/xiaxiangx/p/14315132.html