Skip to content

Latest commit

 

History

History
5 lines (5 loc) · 708 Bytes

Answers.md

File metadata and controls

5 lines (5 loc) · 708 Bytes

The biggest difference between .foreach and .map is that .map returns a new array with the results of calling the function on each element. The difference between and function and a method is that a method is a function associated to an object. A closure is an inner function that has access to the outer enclosing functions variables and other global variables. Window Binding: In a global scope this points to the window. Implicit Binding: This points to the objects preceding the dot. New Binding: This points to the object created by the constructor function. Explicit Binding: This points to the object called with .call or .apply Super() is needed to pass attributes to the parent object.