Book description
To get the most out of modern JavaScript, you need learn the latest features of its parent specification, ECMAScript 6 (ES6). This book provides a highly practical look at ES6, without getting lost in the specification or its implementation details. Armed with practical examples, author Nicolas Bevacqua shows you new ways to deal with asynchronous flow control, declare objects or functions, and create proxies or unique sets, among many other features.
The first title in Bevacqua’s Modular JavaScript series, Practical Modern JavaScript prepares JavaScript and Node.js developers for applied lessons in modular design, testing, and deployment in subsequent books.
This book explains:
- How JavaScript and its standards development process have evolved
- Essential ES6 changes, including arrow functions, destructuring, let and const
- Class syntax for declaring object prototypes, and the new Symbol primitive
- How to handle flow control with Promises, iterators, generators, and async functions
- ES6 collection built-in types for creating object maps and unique sets
- How and when to use the new Proxy and Reflect built-ins
- Changes to Array, Math, numbers, strings, Unicode, and regular expressions, and other improvements since ES5
Publisher resources
Table of contents
- Foreword
- Preface
- ECMAScript and the Future of JavaScript
- ES6 Essentials
- Classes, Symbols, Objects, and Decorators
-
Iteration and Flow Control
- 4.1 Promises
- 4.2 Iterator Protocol and Iterable Protocol
-
4.3 Generator Functions and Generator Objects
- 4.3.1 Generator Fundamentals
- 4.3.2 Iterating over Generators by Hand
- 4.3.3 Mixing Generators into Iterables
- 4.3.4 Tree Traversal Using Generators
- 4.3.5 Consuming Generator Functions for Flexibility
- 4.3.6 Dealing with Asynchronous Flows
- 4.3.7 Throwing Errors at a Generator
- 4.3.8 Returning on Behalf of a Generator
- 4.3.9 Asynchronous I/O Using Generators
- 4.4 Async Functions
- 4.5 Asynchronous Iteration
- Leveraging ECMAScript Collections
- Managing Property Access with Proxies
-
Built-in Improvements in ES6
- 7.1 Numbers
- 7.2 Math
-
7.3 Strings and Unicode
- 7.3.1 String#startsWith
- 7.3.2 String#endsWith
- 7.3.3 String#includes
- 7.3.4 String#repeat
- 7.3.5 String Padding and Trimming
- 7.3.6 Unicode
- 7.3.7 String.prototype[Symbol.iterator]
- 7.3.8 A Proposal to Split Grapheme Segments
- 7.3.9 String#codePointAt
- 7.3.10 String.fromCodePoint
- 7.3.11 Unicode-Aware String Reversal
- 7.3.12 String#normalize
- 7.4 Regular Expressions
- 7.5 Array
- JavaScript Modules
- Practical Considerations
- Index
Product information
- Title: Practical Modern JavaScript
- Author(s):
- Release date: June 2017
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781491943540
You might also like
book
Modern JavaScript Web Development Cookbook
Over 90 recipes to help you write clean code, solve common JavaScript problems, and work on …
book
Learning JavaScript Design Patterns
With Learning JavaScript Design Patterns, you’ll learn how to write beautiful, structured, and maintainable JavaScript by …
book
Clean Code in JavaScript
Get the most out of JavaScript for building web applications through a series of patterns, techniques, …
book
JavaScript Next: Your Complete Guide to the New Features Introduced in JavaScript, Starting from ES6 to ES9
JavaScript has finally grown up. Armed with a slew of new features, JavaScript now makes writing …