commit
c8edd84687
1 changed files with 1 additions and 1 deletions
|
@ -279,7 +279,7 @@ In all the above cases we declare a Function Expression and run it immediately.
|
||||||
|
|
||||||
There are two main differences of `var` compared to `let/const`:
|
There are two main differences of `var` compared to `let/const`:
|
||||||
|
|
||||||
1. `var` variables have no block scope; their visibility is scoped to current function, or global, if declared outside function.
|
1. `var` variables have no block scope, their visibility is scoped to current function, or global, if declared outside function.
|
||||||
2. `var` declarations are processed at function start (script start for globals).
|
2. `var` declarations are processed at function start (script start for globals).
|
||||||
|
|
||||||
There's one more very minor difference related to the global object, that we'll cover in the next chapter.
|
There's one more very minor difference related to the global object, that we'll cover in the next chapter.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue