mirror of
https://github.com/krahets/hello-algo.git
synced 2024-12-25 13:56:28 +08:00
lint
This commit is contained in:
parent
52927cadad
commit
5a24254f6b
1 changed files with 2 additions and 2 deletions
|
@ -2348,7 +2348,7 @@ $$
|
|||
/* 查找数组 nums 中数字 1 所在索引 */
|
||||
function findOne(nums) {
|
||||
for (let i = 0; i < nums.length; i++) {
|
||||
if (nums[i] == 1) {
|
||||
if (nums[i] === 1) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
@ -2392,7 +2392,7 @@ $$
|
|||
/* 查找数组 nums 中数字 1 所在索引 */
|
||||
function findOne(nums: number[]): number {
|
||||
for (let i = 0; i < nums.length; i++) {
|
||||
if (nums[i] == 1) {
|
||||
if (nums[i] === 1) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue