-
Describe the biggest difference between
.forEach&.map.- .forEach iterates through an array and does whatever function you tell it to do; .map does the same but creates a new array with the return values.
-
What is the difference between a function and a method?
- a function is in the global scope and a method is part of an object.
-
What is closure?
- Where a function is called in the lexical environment.
-
Describe the four rules of the 'this' keyword.
- New Binding, Implicit Binding, Explicit Binding, and Window Binding.
-
Why do we need super() in an extended class?
- To invoke the constructors of the previous classes.