Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 663 Bytes

File metadata and controls

14 lines (10 loc) · 663 Bytes
  1. 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.
  2. 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.
  3. What is closure?

    • Where a function is called in the lexical environment.
  4. Describe the four rules of the 'this' keyword.

    • New Binding, Implicit Binding, Explicit Binding, and Window Binding.
  5. Why do we need super() in an extended class?

    • To invoke the constructors of the previous classes.