Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
RiverTwilight committed Jan 6, 2023
1 parent 52927ca commit 5a24254
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/chapter_computational_complexity/time_complexity.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 5a24254

Please sign in to comment.