Skip to content

Commit

Permalink
fold detailed explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
hontas committed Sep 29, 2017
1 parent 89d0f52 commit d1dc423
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ console.log(person) // "John", reassignment is allowed with let

<details>
<summary>Detailed explanation</summary>

The [*scope*](#scope_def) of a variable roughly means "where is this variable available in the code".

##### var
Expand Down Expand Up @@ -284,12 +285,13 @@ console.log(person) // "John", reassignment is allowed with let
console.log(person[0]) // "John"
person = ["Nick"] // raises an error, because reassignment is not allowed with const declared variables
```
</details>

#### External resource
#### External resource

- [How let and const are scoped in JavaScript - WesBos](http://wesbos.com/javascript-scoping/)
- [Temporal Dead Zone (TDZ) Demystified](http://jsrocks.org/2015/01/temporal-dead-zone-tdz-demystified)
- [How let and const are scoped in JavaScript - WesBos](http://wesbos.com/javascript-scoping/)
- [Temporal Dead Zone (TDZ) Demystified](http://jsrocks.org/2015/01/temporal-dead-zone-tdz-demystified)

</details>

### <a name="arrow_func_concept"></a> Arrow function

Expand Down

0 comments on commit d1dc423

Please sign in to comment.