1/24/25, 9:14 PM Eloquent JavaScript
Eloquent JavaScript
4 t h e di t i on ( 2 02 4 )
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.
https://eloquentjavascript.net 1/3
1/24/25, 9:14 PM Eloquent JavaScript
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
1. Values, Types, and Operators (Part 1: Language)
2. Program Structure
3. Functions
4. Data Structures: Objects and Arrays
5. Higher-order Functions
6. The Secret Life of Objects
7. Project: A Robot
8. Bugs and Errors
9. Regular Expressions
10. Modules
11. Asynchronous Programming
12. Project: A Programming Language
13. JavaScript and the Browser (Part 2: Browser)
14. The Document Object Model
15. Handling Events
16. Project: A Platform Game
17. Drawing on Canvas
18. HTTP and Forms
19. Project: A Pixel Art Editor
20. Node.js (Part 3: Node)
21. Project: Skill-Sharing Website
A paper version of Eloquent JavaScript, including an additional
chapter, is being brought out by No Starch Press.
https://eloquentjavascript.net 2/3
1/24/25, 9:14 PM Eloquent JavaScript
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
Tr ansl ations
Fourt h Edit ion
Español (Spanish)
Third Edit ion
( َعَر ِبّيArabic)
( فارسیPersian)
Español (Spanish, partial)
Se c ond Edit ion
َعَر ِبّي(Arabic)
Български (Bulgarian)
Português (Portuguese)
Русский (Russian)
https://eloquentjavascript.net 3/3