Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
By now you know that code blocks get wrapped into functions. We have explored beyond that of a normal function and onto types like anonymous functions and nesting functions inside objects to create the elusive JavaScript method. The function alone can take many different versions, and deciding which one to use can greatly affect your application and how it performs.
In this section we are going to take a look the pizzaParty() function and how it would look if we were to transform it into all the different function types. We’ll also talk about when it might be a good time to use one over the other.
The normal function call is something we have not only been using in this chapter, but throughout the entirety of the book to this point.