Skip to content

Commit

Permalink
chore(hoisting): fix typo (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
sublimeye authored Jan 28, 2025
1 parent 58458e8 commit 06a249e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion questions/explain-hoisting/en-US.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ import foo from './modules/foo';

## Under the hood

In reality, JavaScript creates all variables in the current scope before it even tries to executes the code. Variables created using `var` keyword will have the value of `undefined` where variables created using `let` and `const` keywords will be marked as `<value unavailable>`. Thus, accessing them will cause a `ReferenceError` preventing you to access them before initialization.
In reality, JavaScript creates all variables in the current scope before it even tries to execute the code. Variables created using `var` keyword will have the value of `undefined` where variables created using `let` and `const` keywords will be marked as `<value unavailable>`. Thus, accessing them will cause a `ReferenceError` preventing you to access them before initialization.

In ECMAScript specifications `let` and `const` declarations are [explained as below](https://tc39.es/ecma262/#sec-let-and-const-declarations):

Expand Down

0 comments on commit 06a249e

Please sign in to comment.