Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7ed0eda

Browse files
Update README.md
1 parent 1f6e722 commit 7ed0eda

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,8 @@ console.log(demo); // output =====> undefined
267267
### 13. What is Temporal Dead Zone
268268
A "let" or "const" variable is said to be in a "temporal dead zone" (TDZ) from the start of the block until code execution reaches the line where the variable is declared and initialized.
269269

270-
In JavaScript, variables declared with let or const are not hoisted to the top of the block scope. If you try to access a variable before it is declared, a ReferenceError will be thrown.
270+
In JavaScript, variables declared with let or const are hoisted to the top of the block scope, but they enter a "Temporal Dead Zone" (TDZ).
271+
271272
```javascript
272273
{
273274
// TDZ for name variable starts here

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /