No matter how much experience you have with JavaScript, odds are you don’t fully understand the language. As part of the "You Don’t Know JS" series, this concise yet in-depth guide focuses on new asynchronous features and performance techniques—including Promises, generators, and Web Workers—that let you create sophisticated single-page web applications and escape callback hell in the process. Like other books in this series, You Don’t Know JS: Async & Performance dives into trickier parts of the language that many JavaScript programmers simply avoid. Armed with this knowledge, you can become a true JavaScript master. With this book you will: Explore old and new JavaScript methods for handling asynchronous programming Understand how callbacks let third parties control your program’s execution Address the "inversion of control" issue with JavaScript Promises Use generators to express async flow in a sequential, synchronous-looking fashion Tackle program-level performance with Web Workers, SIMD, and asm.js Learn valuable resources and techniques for benchmarking and tuning your expressions and statements No matter how much experience you have with JavaScript, odds are you don’t fully understand the language. As part of the 'You Don’t Know JS' series, this concise yet in-depth guide focuses on new asynchronous features and performance techniques—including Promises, generators, and Web Workers—that let you create sophisticated single-page web applications and escape callback hell in the process.Like other books in this series, You Don’t Know JS: Async & Performance dives into trickier parts of the language that many JavaScript programmers simply avoid. Armed with this knowledge, you can become a true JavaScript master.With this book you will:Explore old and new JavaScript methods for handling asynchronous programmingUnderstand how callbacks let third parties control your program’s executionAddress the 'inversion of control' issue with JavaScript PromisesUse generators to express async flow in a sequential, synchronous-looking fashionTackle program-level performance with Web Workers, SIMD, and asm.jsLearn valuable resources and techniques for benchmarking and tuning your expressions and statements Introduction 3 Preface 4 Foreword 6 Table of Content 7 Chapter 01: Asynchrony: Now & Later 8 Chapter 02: Callbacks 25 Chapter 03: Promises 38 Chapter 04: Generators 78 Chapter 05: Program Performance 117 Chapter 06: Benchmarking & Tuning 126 Appendix A: `asynquence` Library 141 Appendix B: Advanced Async Patterns 156 Appendix C: Acknowledgments 171