From 8ba124cfd8aaf01d14ccbcb1654798624948fb0a Mon Sep 17 00:00:00 2001 From: Pavel <104815060+ArdRhena@users.noreply.github.com> Date: Mon, 5 Dec 2022 10:48:37 +0700 Subject: [PATCH] docs: update the `prefer-const` example (#16607) --- 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`