From c41059cab5fcd10ab9b8aa1d7c0877ec71173a6b Mon Sep 17 00:00:00 2001 From: Pavel <104815060+ArdRhena@users.noreply.github.com> Date: Sat, 3 Dec 2022 20:46:25 +0700 Subject: [PATCH] Update prefer-const.md --- docs/src/rules/prefer-const.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/rules/prefer-const.md b/docs/src/rules/prefer-const.md index 83d29e58273..19801eb952a 100644 --- a/docs/src/rules/prefer-const.md +++ b/docs/src/rules/prefer-const.md @@ -105,7 +105,7 @@ for (const a of [1, 2, 3]) { // `end` is never reassigned, but we cannot separate the declarations without modifying the scope. for (let i = 0, end = 10; i < end; ++i) { - console.log(a); + console.log(i); } // `predicate` is only assigned once but cannot be separately declared as `const`