Foreword

    Not that there’s anything wrong with jQuery. It lets you do a lot without really knowing JavaScript, and that’s a feature not a bug. But if the job calls for advanced skills in JavaScript performance and maintainability, you need someone who knows how libraries such as jQuery are put together. You need to be able to harness the core of JavaScript the same way they do.

    If I want to get a picture of someone’s core JavaScript skill, I’m most interested in what they make of closures (you’ve read that book of this series already, right?) and how to get the most out of asynchronicity, which brings us to this book.

    If you don’t know promises, now is the time to learn. Promises are now the official way to provide async return values in both JavaScript and the DOM. All future async DOM APIs will use them, many already do, so be prepared! At the time of writing, Promises have shipped in most major browsers, with IE shipping soon. Once you’ve finished that, I hope you left room for the next course, Generators.

    Generators snuck their way into stable versions of Chrome and Firefox without too much pomp and ceremony, because, frankly, they’re more complicated than they are interesting. Or, that’s what I thought until I saw them combined with promises. There, they become an important tool in readability and maintenance.

    Well, I won’t block your enjoyment of the book any longer, on with the show! If you’ve already read part of the book before reading this Foreword, give yourself 10 asynchronous points! You deserve them!

    Jake Archibald
    jakearchibald.com,
    Developer Advocate at Google Chrome