Closed spencer17x closed 4 years ago
See this section in the second-edition of this book:
@getify I read it, it means that I don’t have to dig into it, but try to avoid it?
The best sense I can make of it is... yeah, just don't put function declarations inside of blocks.
Thank you very much for your answers.
Yes, I promise I've read the Contributions Guidelines (please feel free to remove this line).
Please type "I already searched for this issue":
Edition: (1st or 2nd) 1st
Book Title: Scope & Closures
Chapter: Chapter 4: Hoisting
Section Title: Functions First
Question:
in chrome, Why is this code wrong, it will be throwing a TypeError。Is it because of a browser update?
And how do I understand this code, the outer output 1, Is the function hoisted to block-level scope?