Chapter 2. The Power of JavaScript

Although JavaScript is not a difficult language to program, it can be challenging to rise to the level of a true expert. There are several key factors to becoming a skilled JavaScript programmer. The techniques in this chapter will appear repeatedly in the libraries and programming practices taught in the rest of this book, so you should familiarize yourself with these techniques before continuing with those chapters.

There are a number of excellent tools for JavaScript programming, some of them listed in the Appendix A. These tools can provide you with a lot of assistance. Specifically, JSLint will catch a large number of errors that a programmer might miss. Sites such as StackOverflow and O’Reilly Answers will be a good source of other tools.

This chapter is not a full introduction to the power of JavaScript. O’Reilly publishes a number of excellent books on Javscript, including:

Nonblocking I/O and Callbacks

The first key to JavaScript, after learning the language itself, is to understand event-driven programming. In the environment where JavaScript runs, operations tend to be asynchronous, which is to say that they are set up in one place and will execute later after some external event happens.

This can represent a major change from the way I/O happens in traditional ...

Get Programming HTML5 Applications 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.