程序思想
var bFound = false;
var i = 0;
while(!bFound) {
if (arr[i] == searchValue) {
bFound = true;
} else {
i++;
}
}
bFound是个记号,用来记录检索是否成功
作者:lofayo    发布于:
程序思想
var bFound = false;
var i = 0;
while(!bFound) {
if (arr[i] == searchValue) {
bFound = true;
} else {
i++;
}
}
bFound是个记号,用来记录检索是否成功
(无)