Skip to content

Commit 0c9e22e

Browse files
gandhirahulljharb
authored andcommitted
[guide] replacing undefined with ReferenceError
Fixes airbnb#1457
1 parent 7bb8c9f commit 0c9e22e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1616,7 +1616,7 @@ Other Style Guides
16161616
let a = b = c = 1;
16171617
}());
16181618

1619-
console.log(a); // undefined
1619+
console.log(a); // throws ReferenceError
16201620
console.log(b); // 1
16211621
console.log(c); // 1
16221622

@@ -1627,9 +1627,9 @@ Other Style Guides
16271627
let c = a;
16281628
}());
16291629

1630-
console.log(a); // undefined
1631-
console.log(b); // undefined
1632-
console.log(c); // undefined
1630+
console.log(a); // throws ReferenceError
1631+
console.log(b); // throws ReferenceError
1632+
console.log(c); // throws ReferenceError
16331633

16341634
// the same applies for `const`
16351635
```

0 commit comments

Comments
 (0)