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`