Please support this book:
(Ad, please don’t block.)
Table of contents
1 About this book
1.1 Where is the homepage of this book?
1.2 What is in this book?
1.3 What do I get for my money?
1.4 How can I preview the content?
1.5 How do I report errors?
1.6 Tips for reading
1.7 Notations and conventions
II Types, values, variables
2.1 What is type coercion?
2.2 Operations that help implement coercion in the ECMAScript specification
2.4 Example coercion algorithms
2.5 Operations that coerce
2.6 Glossary: terms related to type conversion
3 The destructuring algorithm
3.1 Preparing for the pattern matching algorithm
3.2 The pattern matching algorithm
3.3 Empty object patterns and Array patterns
3.4 Applying the algorithm
4 A detailed look at global variables
4.2 Lexical environments
4.3 The global object
4.4 In browsers,
does not point directly to the global object
4.5 The global environment
4.7 Further reading and sources of this chapter
is a remainder operator, not a modulo operator
5.1 Remainder operator
vs. modulo operator
5.2 An intuitive understanding of the remainder operation
5.3 An intuitive understanding of the modulo operation
5.4 Similarities and differences between
5.5 The equations behind remainder and modulo
5.6 Where are
used in programming languages?
5.7 Further reading and sources of this chapter
III Working with data
6 Copying objects and Arrays
6.1 Shallow copying vs. deep copying
6.4 Further reading
7 Updating data destructively and non-destructively
7.1 Examples: updating an object destructively and non-destructively
7.2 Examples: updating an Array destructively and non-destructively
7.3 Manual deep updating
7.4 Implementing generic deep updating
8 The problems of shared mutable state and how to avoid them
8.1 What is shared mutable state and why is it problematic?
8.2 Avoiding sharing by copying data
8.3 Avoiding mutations by updating non-destructively
8.4 Preventing mutations by making data immutable
8.5 Libraries for avoiding shared mutable state
IV OOP: object property attributes
9 Property attributes: an introduction
9.1 The structure of objects
9.2 Property descriptors
9.3 Retrieving descriptors for properties
9.4 Defining properties via descriptors
: Creating objects via descriptors
9.6 Use cases for
9.7 Omitting descriptor properties
9.8 What property attributes do built-in constructs use?
9.9 API: property descriptors
9.10 Further reading
10 Where are the remaining chapters?