Skip to content

Commit 6f9e155

Browse files
w3cjplatinumazure
authored andcommitted
Docs: Update ambiguous for...in example for guard-for-in (#10114)
1 parent 0360cc2 commit 6f9e155

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/rules/guard-for-in.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ for (key in foo) {
3333
if (Object.prototype.hasOwnProperty.call(foo, key)) {
3434
doSomething(key);
3535
}
36+
}
37+
38+
for (key in foo) {
3639
if ({}.hasOwnProperty.call(foo, key)) {
3740
doSomething(key);
3841
}

0 commit comments

Comments
 (0)