JavaScript Functions are First-class Objects June 10th, 2014

This means that javascript functions are just a special type of object that can do all the things that regular objects can do.  Just like any other variable…

  • A function is an instance of the Object type
  • A function can have properties and has a link back to its constructor method
  • You can store the function in a variable
  • You can pass the function as a parameter to another function
  • You can return the function from a function

Resources