Introduction to JavaScript: a free ebook on JS, Node.js and promises

This short book is an introduction to JavaScript, asynchronous programming and Node.js. It’s on Amazon, and the PDF is free.
What the book covers
Section titled “What the book covers”- JavaScript: the language itself. It is best known for making web pages interactive, but it also runs on servers.
- Node.js: a runtime that runs JavaScript outside the browser, built on Chrome’s V8 engine. It is commonly used for web servers, command-line tools, and build tooling.
- Promises and asynchronous code: a
Promiseis a built-in object representing a value that will be available later, such as the result of a network request or file read. Promises, and theasync/awaitsyntax built on them, replace deeply nested callbacks with code that reads top to bottom.
How it was made
Section titled “How it was made”The book is written in LaTeX, a typesetting system that gives fine control over layout and handles code listings, tables and figures well. The source compiles to a PDF, and the source is on GitHub (linked below).
It is published through Kindle Direct Publishing (KDP), Amazon’s self-publishing platform. KDP lets you publish ebooks and print books to the Amazon store without going through a traditional publisher.
Get a copy
Section titled “Get a copy”For a free copy, please view https://friendlyuser.github.io/assets/pdfs/introToJs.pdf
References
Section titled “References”© 2026 David Li · Home · Blog · RSS ·Classic site · Built with Astro, Starlight and three.js · Logos:Font Awesome Free (CC BY 4.0)