ES2025 edition
There is much new content in this edition:
- As every year: explanations of new ES2025 features
- HTML book: full-text search (above table of contents)
- Operators:
- New section “Converting values to primitives”
- Major rewrite of section on strict equality
- Major rewrite of section on loose equality
- New subsection section “How exactly does loose equality work?”
- Objects:
- Section on structuredClone()
- Major rewrite of section “Object literals: accessors”
- New section “Objects with null prototypes make good dictionaries and lookup tables”
- Strings:
- New long section: “Converting values to strings in JavaScript has pitfalls”
- Modules:
- npm packages, package imports, package exports
- module specifiers in browsers, using npm packages in browsers, import maps
- Recommendations: named exports vs. default exports
- Arrays:
- Improved section “Copying Arrays”
- Improved section “.flatMap()”
- Improved section “.reduce()”
- Sets:
- Major rewrite of the whole chapter
- New chapter: “A roadmap for asynchronous programming”
- (Extracted from chapter “Foundations of asynchronous programming in JavaScript”)
- Promises:
- Major rewrite of section “The basics of using Promises”
- New quick reference for the API
- New section “Thenables (Promise-like objects)”
- Async functions:
- Major rewrite of the whole chapter
- New section “The pros and cons of return await”
- Regular expressions:
- Major rewrite of the whole chapter
- New section: “Tips for making regular expressions easier to use”
- Better table: “Summary: .global (/g) and .sticky”
- New quick reference for RegExp-related functionality.
- Classes:
- Major rewrite of section “Subclassing”
- Quick reference for Object.prototype.*
- Exception handling:
- New section “Chaining errors: the instance property .cause”
- Typed Arrays:
- New section “Converting a Uint8Array (UTF-8) to and from a string”
ES2024 edition
2024-09-03: * Fix names of exercise directories
2024-07-06: * Improve table showing the effects of the RegExp flags /g and /y * Add table for globalThis * “History and evolution of JavaScript”: improve FAQ and headings
2024-06-22: * ES2023 features: see chapter “New JavaScript features” * ES2024 features: see chapter “New JavaScript features” * Major rewrite of chapter on Arrays * Major rewrite of chapter on RegExps * Major rewrite of chapter on Promises * Major rewrite of chapter on Typed Arrays * Major rewrite of the chapter “Next steps” * Major rewrite of the section on the TC39 process, including an explanation of the new stage 2.7. * Quick references for Object.* and Reflect.* * Chapter on modules: * Explanation of re-exports * Improved cheat sheet * Chapter on classes: improved cheat sheet sheet * Many other improvements all over the book
ES2022 edition
- 2022-01-03:
- Covered all new features of ES2022 (throughout the book): see chapter “New JavaScript features”
- New cheat sheets (see chapters): strings, modules, objects, classes, Arrays
- Major rewrites of chapter “objects” and chapter “classes”
- Major rewrite of chapter “Exception handling”
ES2021 edition
- 2021-06-23:
- Mentioned that ES2021 is a standard now.
- Fixed broken image sources in HTML version.
- 2021-06-20: Improved content in section “Methods and the special variable this” in chapter “Single objects”.
2021-02-02 First release of ES2021 edition
- The exercises now run as native ESM modules on Node.js. Previously, they were run via the esm package.
- Material on new ES2021 features:
- String.prototype.replaceAll()
- Promise.any()
- Logical assignment operators
- Underscores (_) as separators in number literals and bigint literals
- New chapter: “New JavaScript features” lists what’s new in each release after ES6.
- Describing some features in more detail:
- ES2019: New section on optional catch binding
- ES2019: New section on Symbol.prototype.description
- ES2018: New section on the template literal revision
- ES2018: New section on Promise.prototype.finally()
- ES2017: New section on trailing commas in function parameter lists and calls
- Rewrite of chapter “Callable values”:
- Moved content on dynamic code evaluation into its own chapter.
- Improved coverage of this
- And more
- Rewrite of chapter “Single objects”:
- Improved coverage of this
- Explaining the function methods .call(), .apply(), .bind()
- Chapter on symbols:
- Mostly new section “Symbols are primitives that are also like objects”
- New section “The descriptions of symbols”
- Major rewrite of section “Symbols as unique property keys”
- Chapter on regular expressions:
- Much improved section “The flags /g and /y, and the property .lastIndex”
ES2020 edition
- 2020-06-23 First release of ES2020 edition:
- Chapter “Operators”:
- New section “The nullish coalescing operator (??) for default values”
- New chapter: “Bigints – arbitrary precision integers”
- Bigints are also mentioned throughout the book (primitive values, falsy values, etc.)
- Chapter “Typed Arrays”:
- New classes: BigInt64Array, BigUint64Array
- New element types (e.g. in DataViews): BigInt64, BigUint64
- Chapter “Modules“:
- Rewritten section on import.meta.url
- Chapter “Single objects”:
- New section “Optional chaining for property accesses and method calls”
- Chapter “Promises for asynchronous programming”:
- New section “Promise combinators: working with Arrays of Promises”
- Chapter “Regular expressions”:
- New section “The flags /g, /y, and the property .lastIndex”
- Omitted chapter: “Environments: under the hood of variables”
- This chapter didn’t fit into the book anymore. I’ll try to publish it somewhere else, free online. And it remains available via the ES2019 edition.
- Chapter “Operators”:
ES2019 edition
- 2020-06-17 Last release of ES2019 edition:
- Fixed line numbering in HTML
- Fixed quiz question on WebAssembly speed
- Deleted incorrect information on await-ing instances of Error
- 2020-06-15: Worked around an Apple Books bug with EPUB files
- 2019-08-31: Print edition