Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 881 Bytes

Answers.md

File metadata and controls

17 lines (13 loc) · 881 Bytes

.forEach returns undefined, but .map returns an array of the same size as the input array.

A method is a function on an object, ie, a function stored as a value in a key:value pair.

Closure is when a nested function has access to variables that are outside of it (the nested function) but within the scope of the function within which it is nested.

  1. 'this' binds to the window object.
  2. Implicit binding: 'this' binds to whatever invokes it.
  3. Explicit binding: .call, .apply, or .bind is used to define the context of 'this'.
  4. The 'new' keyword is used to bind 'this' to a new instance of a constructor function.

super() is used to access and call functions on an object's parent. It ensures that the properties and methods of the parent will be accessible to the child.