List of Figures

 

Chapter 1. Enter the ninja

Figure 1.1. JavaScript consists of a close relationship between objects, functions, and closures.

Figure 1.2. Analyzing the cost versus the benefit of supporting various desktop browsers indicates where we should put our effort.

Figure 1.3. The mobile landscape, where development costs are fairly even, comes down to usage statistics.

Chapter 2. Arming with testing and debugging

Figure 2.1. Logging lets us see the state of things in our code as it’s running.

Figure 2.2. Breakpoints allow us to halt execution at a specific line of code so we can take a gander at the state.

Figure 2.3. Stepping into a method lets us see the new state in which it executes.

Figure 2.4. A screenshot of the JS Bin website in action

Figure 2.5. A dishearteningly large percentage of JavaScript developers don’t test at all!

Figure 2.6. Most test-savvy developers favor a small handful of testing tools.

Chapter 3. Functions are fundamental

Figure 3.1. JavaScript is to Java as hamburger is to ham; both are delicious, but they don’t have much in common except a name.

Figure 3.2. A simplified view of how browsers process the event loop, handling each event in its own turn within a single thread

Figure 3.3. Our useless function may not do much, but it shows that functions can be passed around and invoked at any later time.

Figure 3.4. Running our test page shows that all those things that we said about functions are true!