This commit is contained in:
krahets
2023-08-04 05:24:49 +08:00
parent c4046ca688
commit fafdebb75c
27 changed files with 972 additions and 536 deletions

View File

@@ -1090,7 +1090,7 @@ elementAddr = firtstElementAddr + elementLength * elementIndex
/* 在数组中查找指定元素 */
function find(nums, target) {
for (let i = 0; i < nums.length; i++) {
if (nums[i] == target) return i;
if (nums[i] === target) return i;
}
return -1;
}