From 5a24254f6b95d19bae6a366e0695df6ee91d026a Mon Sep 17 00:00:00 2001 From: RiverTwilight Date: Fri, 6 Jan 2023 08:32:10 +0800 Subject: [PATCH] lint --- docs/chapter_computational_complexity/time_complexity.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/chapter_computational_complexity/time_complexity.md b/docs/chapter_computational_complexity/time_complexity.md index fa07bd542..b6b68c443 100644 --- a/docs/chapter_computational_complexity/time_complexity.md +++ b/docs/chapter_computational_complexity/time_complexity.md @@ -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; } }