9.
for...in 148
Object.keys 148
Object-Oriented Programming 149
Class and Instance Creation 150
The Prototype 153
Static Methods 155
Inheritance 156
Polymorphism 157
Enumerating Object Properties, Revisited 158
Multiple Inheritance, Mixins, and Interfaces 159
Conclusion 161
10.
Maps 163
Weak Maps 165
Sets 166
Weak Sets 167
11.
The Error Object 169
Exception Handling with try and catch 170
Throwing Errors 171
Exception Handling and the Call Stack 171
Let Exceptions Be Exceptional 174
12.
Generators 179
yield Expressions and Two-Way Communication 180
Conclusion 182
13.
Functions as Subroutines That Return a Value 184
Table of Contents | ix