Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 759 Bytes

Answers.md

File metadata and controls

15 lines (11 loc) · 759 Bytes

Describe the biggest difference between .forEach & .map. forEach executes a provided function once for each element in an arry map creates a new array with the results of calling a provided function on every element in the calling array.

What is the difference between a function and a method? A function returns a value, while a method is similar to a function but is internal to a class.

What is closure? closure is an inner function that has access to an outer function through enclosing.

Describe the four rules of the 'this' keyword. is it a new binding, is it an explicit binding, is it an implicit binding, and is it calling the window.

Why do we need super() in an extended class? because it allows us to bind our this keyword to the child class.