Check nearby libraries
Buy this book
"Eloquent JavaScript is a book providing an introduction to the JavaScript programming language and programming in general."
Check nearby libraries
Buy this book
Previews available in: English
Showing 5 featured editions. View all 11 editions?
Edition | Availability |
---|---|
1
Eloquent Javascript
2024-11-05, No Starch Press
Paperback
in English
- 4th Edition
1718504101 9781718504103
|
aaaa
Libraries near you:
WorldCat
|
2
Eloquent JavaScript: A Modern Introduction to Programming
Dec 04, 2018, No Starch Press
Paperback
in English
- 3rd edition
1593279507 9781593279509
|
bbbb
Libraries near you:
WorldCat
|
3
Eloquent JavaScript: A Modern Introduction to Programming
Dec 14, 2014, No Starch Press
1593275846 9781593275846
|
cccc
Libraries near you:
WorldCat
|
4 |
zzzz
Libraries near you:
WorldCat
|
5 |
zzzz
Libraries near you:
WorldCat
|
Book Details
Table of Contents
Introduction. 1
On Programming. 2
Why Language Matters. 3
What Is JavaScript?. 5
Code, and What to Do with It. 6
Overview of This Book. 7
Typographic Conventions. 8
Part I: Language
1: Values, Types, and Operators. 11
Values. 12
Numbers. 12
Arithmetic. 13
Special Numbers. 14
Strings. 14
Unary Operators. 15
Boolean Values. 16
Comparison. 16
Logical Operators. 17
Empty Values. 18
Automatic Type Conversion. 18
Short-Circuiting of Logical Operators. 19
Summary. 20
2: Program Structure. 23
Expressions and Statements. 23
Bindings. 24
Binding Names. 26
The Environment. 26
Functions. 26
The console.log Function. 27
Return Values. 27
Control Flow. 28
Conditional Execution. 28
while and do Loops. 30
Indenting Code. 31
for Loops. 32
Breaking Out of a Loop. 33
Updating Bindings Succinctly. 33
Dispatching on a Value with switch. 34
Capitalization. 35
Comments. 35
Summary. 36
Exercises. 36
Looping a Triangle. 36
FizzBuzz. 37
Chessboard. 37
3: Functions. 39
Defining a Function. 39
Bindings and Scopes. 40
Nested Scope. 41
Functions as Values. 42
Declaration Notation. 42
Arrow Functions. 43
The Call Stack. 44
Optional Arguments. 45
Closure. 46
Recursion. 47
Growing Functions. 50
Functions and Side Effects. 52
Summary. 52
Exercises. 53
Minimum. 53
Recursion. 53
Bean Counting. 53
4: Data Structures: Objects and Arrays. 57
The Weresquirrel. 58
Datasets. 58
Properties. 59
Methods. 60
Objects. 60
Mutability. 63
The Lycanthrope’s Log. 64
Computing Correlation. 65
Array Loops. 67
The Final Analysis. 67
Further Arrayology. 69
Strings and Their Properties. 70
Rest Parameters. 72
The Math Object. 73
Destructuring. 74
Optional Property Access. 75
JSON. 75
Summary. 76
Exercises. 77
The Sum of a Range. 77
Reversing an Array. 77
A List. 77
Deep Comparison. 78
5: Higher-Order Functions. 81
Abstraction. 82
Abstracting Repetition. 82
Higher-Order Functions. 84
Script Dataset. 85
Filtering Arrays. 86
Transforming with map. 86
Summarizing with reduce. 87
Composability. 88
Strings and Character Codes. 89
Recognizing Text. 91
Summary. 92
Exercises. 92
Flattening. 92
Your Own Loop. 93
Everything. 93
Dominant Writing Direction. 93
6: The Secret Life of Objects. 95
Abstract Data Types. 95
Methods. 96
Prototypes. 97
Classes. 98
Private Properties. 100
Overriding Derived Properties. 101
Maps. 102
Polymorphism. 104
Getters, Setters, and Statics. 105
Symbols. 106
The Iterator Interface. 107
Inheritance. 109
The instanceof Operator. 110
Summary. 111
Exercises. 111
A Vector Type. 111
Groups. 112
Iterable Groups. 112
7: Project: A Robot. 115
Meadowfield. 115
The Task. 117
Persistent Data. 118
Simulation. 119
The Mail Truck’s Route. 121
Pathfinding. 121
Exercises. 123
Measuring a Robot. 123
Robot Efficiency. 124
Persistent Group. 124
8: Bugs and Errors. 127
Language. 127
Strict Mode. 128
Types. 129
Testing. 130
Debugging. 131
Error Propagation. 132
Exceptions. 133
Cleaning Up After Exceptions. 134
Selective Catching. 136
Assertions. 138
Summary. 138
Exercises. 139
Retry. 139
The Locked Box. 139
9: Regular Expressions. 141
Creating a Regular Expression. 141
Testing for Matches. 142
Sets of Characters. 142
International Characters. 144
Repeating Parts of a Pattern. 145
Grouping Subexpressions. 146
Matches and Groups. 146
The Date Class. 147
Boundaries and Look-Ahead. 148
Choice Patterns. 149
The Mechanics of Matching. 149
Backtracking. 150
The replace Method. 151
Greed. 153
Dynamically Creating RegExp Objects. 154
The search Method. 154
The lastIndex Property. 155
Parsing an INI File. 156
Code Units and Characters. 158
Summary. 159
Exercises. 160
Regexp Golf. 160
Quoting Style. 161
Numbers Again. 161
10: Modules. 163
Modular Programs. 164
ES Modules. 164
Packages. 166
CommonJS Modules. 167
Building and Bundling. 170
Module Design. 170
Summary. 172
Exercises. 173
A Modular Robot. 173
Roads Module. 173
Circular Dependencies. 173
11: Asynchronous Programming. 175
Asynchronicity. 176
Callbacks. 177
Promises. 178
Failure. 180
Carla. 181
Breaking In. 182
async Functions. 184
Generators. 185
A Corvid Art Project. 186
The Event Loop. 189
Asynchronous Bugs. 190
Summary. 191
Exercises. 191
Quiet Times. 191
Real Promises. 192
Building Promise.all. 192
12: Project: A Programming Language. 195
Parsing. 195
The Evaluator. 199
Special Forms. 200
The Environment. 202
Functions. 203
Compilation. 204
Cheating. 205
Exercises. 205
Arrays. 205
Closure. 206
Comments. 206
Fixing Scope. 206
Part II: Browser
13: Javascript and the Browser. 209
Networks and the Internet. 209
The Web. 211
HTML. 211
xvi Contents in Detail
HTML and JavaScript. 213
In the Sandbox. 214
Compatibility and the Browser Wars. 215
14: The Document Object Model. 217
Document Structure. 217
Trees. 218
The Standard. 219
Moving Through the Tree. 220
Finding Elements. 221
Changing the Document. 222
Creating Nodes. 223
Attributes. 224
Layout. 225
Styling. 227
Cascading Styles. 228
Query Selectors. 229
Positioning and Animating. 230
Summary. 232
Exercises. 232
Build a Table. 232
Elements by Tag Name. 233
The Cat’s Hat. 233
15: Handling Events. 235
Event Handlers. 235
Events and DOM Nodes. 236
Event Objects. 237
Propagation. 237
Default Actions. 239
Key Events. 239
Pointer Events. 240
Mouse Clicks. 241
Mouse Motion. 242
Touch Events. 243
Scroll Events. 244
Focus Events. 245
Load Event. 246
Events and the Event Loop. 246
Timers. 247
Debouncing. 248
Summary. 249
Exercises. 249
Balloon. 249
Mouse Trail. 249
Tabs. 250
16: Project: A Platform Game. 253
The Game. 253
The Technology. 254
Levels. 255
Reading a Level. 255
Actors. 257
Drawing. 260
Motion and Collision. 265
Actor Updates. 267
Tracking Keys. 269
Running the Game. 270
Exercises. 272
Game Over. 272
Pausing the Game. 272
A Monster. 272
17: Drawing On Canvas. 275
SVG. 276
The canvas Element. 276
Lines and Surfaces. 277
Paths. 278
Curves. 279
Drawing a Pie Chart. 282
Text. 283
Images. 283
Transformation. 285
Storing and Clearing Transformations. 287
Back to the Game. 288
Choosing a Graphics Interface. 293
Summary. 294
Exercises. 294
Shapes. 294
The Pie Chart. 295
A Bouncing Ball. 295
Precomputed Mirroring. 295
18: HTTP and Forms. 297
The Protocol. 297
Browsers and HTTP. 299
Fetch. 300
HTTP Sandboxing. 302
Appreciating HTTP. 302
Security and HTTPS. 303
Form Fields. 303
Focus. 305
Disabled Fields. 306
The Form as a Whole. 306
Text Fields. 307
Checkboxes and Radio Buttons. 309
Select Fields. 310
File Fields. 311
Storing Data Client-Side. 312
Summary. 314
Exercises. 315
Content Negotiation. 315
A JavaScript Workbench. 315
Conway’s Game of Life. 315
19: Project: A Pixel Art Editor. 319
Components. 320
The State. 321
DOM Building. 322
The Canvas. 323
The Application. 325
Drawing Tools. 327
Saving and Loading. 330
Undo History. 332
Let’s Draw. 333
Why Is This So Hard?. 334
Exercises. 335
Keyboard Bindings. 335
Efficient Drawing. 335
Circles. 336
Proper Lines. 336
Part III: Node
20: Node.js. 339
Background. 339
The node Command. 340
Modules. 341
Installing with NPM. 342
Package Files. 342
Versions. 343
The Filesystem Module. 344
The HTTP Module. 345
Streams. 346
A File Server. 347
Summary. 352
Exercises. 353
Search Tool. 353
Directory Creation. 353
A Public Space on the Web. 353
21: Project: Skill-Sharing Website. 355
Design. 356
Long Polling. 356
HTTP Interface. 357
The Server. 359
Routing. 359
Serving Files. 360
Talks as Resources. 362
Long Polling Support. 364
The Client. 365
HTML. 365
Actions. 366
Rendering Components. 367
Polling. 369
The Application. 370
Exercises. 371
Disk Persistence. 371
Comment Field Resets. 371
22: JavaScript and Performance. 373
Staged Compilation. 374
Graph Layout. 374
Defining a Graph. 376
Force-Directed Layout. 377
Avoiding Work. 380
Profiling. 381
Function Inlining. 383
Dynamic Types. 384
Summary. 385
Exercises. 386
Prime Numbers. 386
Faster Prime Numbers. 386
Appendix: Exercise Hints. 387
Index. 409
Edition Notes
Updated to ECMAScript 2024
The Physical Object
ID Numbers
Links outside Open Library
Community Reviews (0)
Feedback?History
- Created September 27, 2024
- 2 revisions
Wikipedia citation
×CloseCopy and paste this code into your Wikipedia page. Need help?
September 27, 2024 | Edited by Freso | more details per https://nostarch.com/eloquent-javascript-4th-edition and https://www.goodreads.com/book/show/216524172-eloquent-javascript-4th-edition |
September 27, 2024 | Created by Freso | Added new book. |