fix(quiz): Update en-US.mdx (#408)
This commit is contained in:
parent
bf1a168fc3
commit
82d13f0a4d
|
|
@ -35,7 +35,7 @@ console.log(baz); // ReferenceError: baz is not defined
|
|||
console.log(qux); // ReferenceError: qux is not defined
|
||||
```
|
||||
|
||||
`var` allows variables to be hoisted, meaning they can be referenced in code before they are declared. `let` and `const` will not allow this, instead throwing an error.
|
||||
`var` ,`let` and `const` declared variables are all hoisted. `var` declared variables are auto-initialised with an undefined value. However, `let` and `const` variables are not initialised and accessing them before the declaration will result in a `ReferenceError` exception because they are in a "temporal dead zone" from the start of the block until the declaration is processed.
|
||||
|
||||
```js
|
||||
console.log(foo); // undefined
|
||||
|
|
|
|||
Loading…
Reference in New Issue