*, 10
~, 10
(, 25
!!, 151
$, 169
%, 10
&, 10
&&, 13
., 28
<<, 10
>>, 10
>>>, 10
/, 25
^, 10
|, 10
, (expression sequencing operator), 55
Actors, 101
Actual argument, 67
addClass, 169
addEntry, 65
Anonymous function expressions, 41, 47–50, 60, 74
Argument creep, 149
Arguments
self-documenting, 149
arguments object, 3–5, 46, 67–72, 79–81, 138–140, 146, 148
Array.isArray, 162
Array-like objects, 138–140, 160–164, 166
associative, 114
forEach method, 21, 72–73, 75, 108, 111, 128, 130–131, 134–138, 162, 191, 193–194
map method, 61, 74–75, 98–100, 111, 134–135, 137, 139, 168
Asynchronous APIs, 171–175, 182
Asynchronous callbacks, 194–197
Automatic semicolon insertion, 19, 24
Backward compatibility, 3
Basic Multilingual Plane (BMP), 26–28
Bitwise arithmetic operators, 7–8, 10
Block scoping, 42
Blocking function, 172
Callback function, 60, 62, 65, 72–73, 99–100, 175–179
checkPassword, 84–86, 92–93, 95
choose, 199
[[Class]] internal property, 107–109
Closures, 39–41, 75–77, 94–95, 176
Comma-separated values (CSV), 98–100
Comments, 149
Concatenation, 3–5, 22–23, 139–140
Concurrency
asynchronous callbacks, 194–197
counter and data race, 190–194
const, 2
Context (graphics), 101
Counter and data race, 190–194
CSV (comma-separated values), 98–100
Curry, Haskell, 75
Currying, 75
decodeURI, 28
decodeURIcomponent, 28
Defensive programming, 165
Deferreds, 197
Diagnostic information, 105
Dictionaries, 113–116, 123–125
“Do what I mean” semantics, 17
Double negation pattern (!!), 151
Double-precision floating-point, 7–9
downloadAllAsync, 178–179, 181–182, 190–194
downloadAsync, 173–178, 180–184, 195
downloadOneSync, 183
downloadSync, 172
downloadURL, 177
Duck testing, 161
Duck typing, 159
Dynamic typing, 159
ECMAScript standard, 1–2, 19, 28, 55, 77, 106–108
Edition 5 (ES5), 1, 3, 134–135, 162
encodeURI, 28
encodeURIcomponent, 28
Enumerable properties, 125–127
Error-handling callbacks, 180–181
Escape sequences, 168
Event loop, 173
Event queue, 171, 172–175, 186–190
Event-loop concurrency, 171
Exceptions, 44, 136, 179–180, 196–197
Expression sequencing operator (,), 55
Floating-point arithmetic, 124
Fluent style, 169
forEach, 21, 64–65, 72–73, 75, 108, 111, 128, 130–131, 134–138, 162, 191, 193–194
for...in loop, 113–116, 128–129, 132
Formal parameter, 67
Function [[Class]], 106, 108–109
Function declaration, 47
Function expression, 41, 47–50
arguments object, 3–5, 46, 67–72, 79–81, 138–140, 146, 148
call method, 63–65, 119–122, 138–140
Futures, 197
Generic array methods, 138–140
hasOwnProperty, 64, 109, 115–122
hostname, 147
html method, 169
Identification number, 105–106
Image data, 102
Immediately invoked function expressions (IIFE), 5, 6, 44–46
Implementation inheritance, 83, 109
Inheritance, 83–85, 89, 104, 108–109, 118, 158–159
inNetwork, 189
Instance properties, 103
instanceof operator, 162
Integer addition, 125
Introspection, 109
isNaN, 11
isReallyNaN, 12
join, 198
jQuery, 169
JSON [[Class]], 108
JSON data format, 33
Lightweight dictionaries, 113–116
Logical OR operator (||), 147, 150–151
map, 61, 74–75, 98–100, 111, 134–135, 137, 139, 168
Math [[Class]], 108
me, 100
Merging function, 151
Mock object, 159
Module systems, 6
moveTo, 102
Named function expression, 47
NaN (not a number), 11
Nested function declaration, 52
next, 189
Node.js, 181
Nonblocking APIs, 172
null, 146
Number [[Class]], 108
Object [[Class]], 108
Object extension function, 151–153
Object introspection, 109
Objects as scopes, 49
Object.create, 89–91, 103–105, 116–117
Object.defineProperty, 126–127
Object.getPrototypeOf, 83–88, 109
Object.prototype, 115–116, 118–122, 125–127
hasOwnProperty method, 64, 109, 115–122
toString method, 12–14, 17–18, 107, 163
Operators
bitwise arithmetic, 10
expression sequencing (,), 55
Overloading structural types, 161
Pollution of objects, 87
Polyfill, 111
Profiling, 105
Property descriptor map, 116–117
__proto__, 83–84, 86–89, 109, 117, 121
Prototypes
as implementation detail, 109–110
__proto__, 83–84, 86–89, 109, 117, 121
Querying web pages, 169
Radix, 8
removeClass, 169
Restricted productions, 24
Run-to-completion guarantee, 172, 175
Scene graph, 101
Scope, 31
anonymous and named function expressions, 47–50
immediately invoked function expressions (IIFE), 5, 6, 44–46
Scope chain, 36
Self-documenting arguments, 149
Shift operators, 10
Short-circuiting methods, 137
Single character pattern, 28
sort, 60
split, 110
Stack overflow, 185
State
stateless API, 153–156, 167–169
String characters, replacing, 167–169
String literal, 3
Structural types, 161
Structural typing, 159
Subclass constructors, 101–105
Superclass constructors, 101–105
Superclass property names, 105–106
Supplementary plane, 27
Synchronous function, 172
that, 100
Threads, 172
toString, 7–8, 12–14, 17–18, 77–78, 84–86, 92–95, 153, 167
true, 146
uint32, 166
Unary operator, 17
undefined, 11, 14, 144–151, 169
Underscore character, 94
User class, 86
User.prototype, 84–87, 90–91, 93
UTF-8, 26
UTF-32, 26
val, 41
Variable-arity function, 65–66, 68
Variable-length encoding, 27
Web development practices, 144
when, 198
Wiki formatter, 157
Work-list, 131