Skip to content

Commit

Permalink
docs: update the prefer-const example (#16607)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArdRhena committed Dec 5, 2022
1 parent e6cb05a commit 8ba124c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/src/rules/prefer-const.md
Expand Up @@ -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`
Expand Down

0 comments on commit 8ba124c

Please sign in to comment.