O'Reilly logo

Single Page Web Applications: JavaScript end-to-end by Michael S. Mikowski and Josh C. Powell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. Reintroducing JavaScript

This chapter covers
  • Variable scoping, function hoisting, and the execution context object
  • Explaining variable scope chains and why we use them
  • Creating JavaScript objects using prototypes
  • Writing self-executing anonymous functions
  • Using the module pattern and private variables
  • Exploiting closures for fun and profit

This chapter reviews unique JavaScript concepts that we need to know if we’re to build a native JavaScript single page application of significant scale. The snippet of code in listing 2.1 from chapter 1 shows the concepts we’ll be covering. If you understand all of these how and why concepts then you might skim or skip this chapter and get straight to work on an SPA in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required