Eloquent JavaScriptsecond edition
A modern introduction to JavaScript, programming, and the wonders of the digital.
Written by Marijn Haverbeke.
Licensed under a Creative Commons attribution-noncommercial license. All code in this book may also be considered licensed under an MIT license.
Illustrations by various artists: Cover by Wasif Hyder. Computer (introduction) by Max Xiantu. Sea of bits (Chapter 1) and weresquirrel (Chapter 4) by Margarita MartÃnez and José Menor. Octopuses (Chapter 2 and 4) by Jim Tierney. Object with on/off switch (Chapter 6) by Dyle MacGregor. Regular expression diagrams in Chapter 9 generated with regexper.com by Jeff Avallone. Game concept for Chapter 15 by Thomas Palef. Pixel art in Chapter 16 by Antonio Perdomo Pastor.
Contents
- Introduction
-
(Part 1: Language)
Values, Types, and Operators - Program Structure
- Functions
- Data Structures: Objects and Arrays
- Higher-order Functions
- The Secret Life of Objects
- Project: Electronic Life
- Bugs and Error Handling
- Regular Expressions
- Modules
- Project: A Programming Language
-
(Part 2: Browser)
JavaScript and the Browser - The Document Object Model
- Handling Events
- Project: A Platform Game
- Drawing on Canvas
- HTTP
- Forms and Form Fields
- Project: A Paint Program