Skip to content

Commit b4fcb09

Browse files
authored
clarity on code codesONLY#19
More Clarity in code
2 parents a22ce9d + acd0352 commit b4fcb09

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

NamasteJS/E08 - let & const in JS - Temporal Dead Zone.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
```
66
// code example 1
77
8+
console.log(b);
89
console.log(a);
910
let a = 10;
1011
var b = 100;
@@ -13,6 +14,7 @@ var b = 100;
1314

1415
Output:
1516

17+
> undefined
1618
> Uncaught ReferenceError: cannot access 'a' before initialization
1719
1820
Technically, in JS if a is hoisted, then this error wasn't expected.

0 commit comments

Comments
 (0)