What this book covers
Chapter 1, Building with Modules, covers how to use ECMAScript modules to organize code and how to configure modern browsers to use them. This chapter also covers compatibility with Google's Chrome and Mozilla's Firefox browser, and how to make them work with modules.
Chapter 2, Staying Compatible with Legacy Browsers, covers how to convert code that uses ECMAScript modules into a format that can be used by platforms that don't support them. We use webpack, a common JavaScript compilation tool, to assemble our modules into a single JavaScript file (called a bundle) and load it into our browser when ECMASript modules aren't compatible.
Chapter 3, Working with Promises, covers how to use the Promise API to organize asynchronous programs. We'll take a look at how to propagate results through promise chains and handle errors. Promises are generally regarded as an improvement over the older callback pattern. This chapter also lays a foundation for the topic covered in the next chapter.
Chapter 4, Working with async/await and Functions, covers how to use the new async and await features. Building on the preceding chapter, we'll take a look at how they can be replaced or used in concert with the Promise API, improving program readability while maintaining compatibility.
Chapter 5, Web Workers, Shared Memory, and Atomics, covers the web APIs that can be used to process data in parallel. This chapter is emblematic for the recent development of JavaScript as a language and web browsers as platforms. Parallel programming is a new domain for JavaScript that brings new possibilities and problems to the language.
Chapter 6, Plain Objects, demonstrates the use of API and syntax options to work with plain objects. We'll look at how to work with objects as a collection and how to define properties with some interesting behaviors.
Chapter 7, Creating Classes, covers the use of ECMAScript class semantics. We'll create new classes with behaviors that are defined on single instances and whole classes. We'll take a look at how to add properties and define methods.
Chapter 8, Inheritance and Composition, builds on our knowledge from the preceding chapter; we'll combine classes into larger structures. We'll also take a look at how to use both composition and inheritance to share behaviors between classes, and we'll discuss the benefits and drawbacks of each.
Chapter 9, Larger Structures with Design Patterns, further expanding on the prior two chapters, looks at some common ways that programs are organized for certain tasks. We'll implement some common design patterns and demonstrate how we can expand and modify them for different uses.
Chapter 10, Working with Arrays, covers the use of the new Array API features. In the past, working with arrays meant a lot of loops and keeping track of indices, or importing bulky libraries to clean repeated code. This chapter will show some new, functionally inspired, methods that make working with these collections much easier.
Chapter 11, Working with Maps and Symbols, covers how to make use of the Map and WeakMap classes to create relationships between different kinds of values. In this chapter, we'll look at how to use the APIs of these two classes, how they are different, and how we can control which types go into them.
Chapter 12, Working with Sets, demonstrates the use of the Set and WeakSet classes. These classes are excellent when the order of elements doesn't matter, and we just want to is something exists. We'll see how to use the APIs of these two classes, when to use one over the other, and how we can control what types go into them.