Part 2. Apprentice training

Now that you’re mentally prepared for training and you’re armed with the basic testing tools that we developed in the previous section, you’re ready to learn the fundamentals of the JavaScript tools and weapons available to you.

In chapter 3, you’ll learn all about the most important basic concept of JavaScript: no, not the object, but the function. This chapter will teach you why understanding JavaScript functions is the key to unlocking the secrets of the language.

Chapter 4 continues our in-depth exploration of functions—yes, they are important enough to warrant multiple chapters—showing how functions can be used to solve the challenges and problems that we face as web developers.

Chapter 5 takes functions to the next level with training on closures—probably one of the most misunderstood (and even unknown) aspects of the JavaScript language.

Object fundamentals are the subject of your training in chapter 6, with particular focus on how the blueprint of objects is determined by its prototype. This chapter will teach you how the object-oriented nature of JavaScript can be exploited.

From there, your training heads into deeper territory, with a thorough examination of regular expressions in chapter 7. You’ll learn that many tasks that used to take reams of code to accomplish can be condensed to a mere handful of statements through the proper use of JavaScript regular expressions.