Don't Use JavaScript Variables Without Knowing Temporal Dead Zone

added by JavaScript Kicks
10/2/2019 7:27:45 AM

585 Views

Let me ask you a simple question. Which of the following code snippets will generate an error? The first one that creates an instance, then defines the used class: Or the second one that first invokes, then defines the function? The correct answer: the first snippet, the one with a class, generates a ReferenceError.


0 comments