Chapter 3. Getting functional
Introducing Functions
Get ready for your first superpower. Youâve got some programming under your belt; now itâs time to really move things along with functions. Functions give you the power to write code that can be applied to all sorts of different circumstances, code that can be reused over and over, code that is much more manageable, code that can be abstracted away and given a simple name so you can forget all the complexity and get on with the important stuff. Youâre going to find not only that functions are your gateway from scripter to programmer, theyâre the key to the JavaScript programming style. In this chapter weâre going to start with the basics: the mechanics, the ins and outs of how functions really work, and then youâll keep honing your function skills throughout the rest of the book. So, letâs get a good foundation started, now.
Note
More on this as we progress through the book.
Get Head First JavaScript Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.