Eloquent JavaScript4th edition (2024)
This is a book about JavaScript, programming, and the wonders of the digital. You can read it online here, or buy your own paperback copy.
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 Péchane Sumi-e. Chapter illustrations by Madalina Tantareanu. Pixel art in Chapters 7 and 16 by Antonio Perdomo Pastor. Regular expression diagrams in Chapter 9 generated with regexper.com by Jeff Avallone. Game concept for Chapter 16 by Thomas Palef.
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: A Robot
- Bugs and Errors
- Regular Expressions
- Modules
- Asynchronous Programming
- 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 and Forms
- Project: A Pixel Art Editor
-
(Part 3: Node)
Node.js - Project: Skill-Sharing Website
A paper version of Eloquent JavaScript, including an additional chapter, is being brought out by No Starch Press.
Other pages
- Code sandbox and exercise solutions
- Errata for the paper book
- This book as a single PDF file (& small version for mobile)
- This book as an EPUB file
- This book as a MOBI (Kindle) file
- The first edition of the book
- The second edition of the book
- The third edition of the book