Skip to content

Commit

Permalink
docs: add one-var example with for-loop initializer (#15596)
Browse files Browse the repository at this point in the history
Refs #15592
  • Loading branch information
mdjermanovic committed Feb 10, 2022
1 parent 2dc38aa commit 570a036
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/rules/one-var.md
Expand Up @@ -242,6 +242,11 @@ class C {
let qux;
}
}

// declarations with multiple variables are allowed in for-loop initializers
for (var i = 0, len = arr.length; i < len; i++) {
doSomething(arr[i]);
}
```

### consecutive
Expand Down

0 comments on commit 570a036

Please sign in to comment.