refactor promise, geneerators, global object
This commit is contained in:
parent
be9c5a7b5f
commit
2ee2751216
69 changed files with 900 additions and 643 deletions
|
@ -182,4 +182,4 @@ There are two main differences of `var`:
|
|||
|
||||
There's one more minor difference related to the global object, we'll cover that in the next chapter.
|
||||
|
||||
These differences are actually a bad thing most of the time. First, we can't create block-local variables. And hoisting just creates more space for errors. So, for new scripts `var` is used exceptionally rarely.
|
||||
These differences are actually a bad thing most of the time. Block-level variables is such a great thing. That's why `let` was introduced in the standard long ago, and is now a major way (along with `const`) to declare a variable.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue