Skip to content

Commit 8ba124c

Browse files
authored
docs: update the prefer-const example (#16607)
1 parent e6cb05a commit 8ba124c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/src/rules/prefer-const.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ for (const a of [1, 2, 3]) {
105105

106106
// `end` is never reassigned, but we cannot separate the declarations without modifying the scope.
107107
for (let i = 0, end = 10; i < end; ++i) {
108-
console.log(a);
108+
console.log(i);
109109
}
110110

111111
// `predicate` is only assigned once but cannot be separately declared as `const`

0 commit comments

Comments
 (0)