Chapter 3. Functions are fundamental

In this chapter we discuss

  • Why understanding functions is so crucial
  • How functions are first-class objects
  • How the browser invokes functions
  • Declaring functions
  • The secrets of how parameters are assigned
  • The context within a function

You might have been somewhat surprised, upon turning to this part of the book dedicated to JavaScript fundamentals, to see that the first topic of discussion is to be functions rather than objects.

We’ll certainly be paying plenty of attention to objects (particularly in chapter 6), but when it comes down to brass tacks, the main difference between writing JavaScript code like the average Joe (or Jill) and writing it like a JavaScript ninja is understanding JavaScript ...

Get Secrets of the JavaScript Ninja now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.