Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 895 Bytes

File metadata and controls

24 lines (16 loc) · 895 Bytes

Describe the biggest difference between .forEach & .map. forEach loops through and doesn't return anything. .map returns a new array

What is the difference between a function and a method? a method is a function implicityly passed the object on which it is called. functions are called outside the object explicitly.

What is closure? bundled functions that reference each other through protected variables passed from the outer scopes

Describe the four rules of the 'this' keyword. window binding - basic deault scope

implicit binding - uses a dot invocation to reference a specific object

explicit binding - the function being invoked is outside of the object being called. uses .call() .apply() and .bind()

new - creates a new object bound to the original 'this'

Why do we need super() in an extended class? to pass any new attributes back up to the constructor of the parent object.