Leanpub Header

Skip to main content

Modern JavaScript (ES2026)

From First Line to Production — A Complete Guide to ES2026

This book is 100% completeLast updated on 2026-07-29

From your first line of code to advanced JavaScript, this book builds real understanding instead of memorization. Learn how the language works, why modern features exist, and how professionals use them every day. Covering ES2026 and upcoming additions like Temporal, it gives you the skills to write clean, confident production-ready code.

Minimum price

$19.00

$29.00

You pay

Author earns

$

Also available for 1 book credit with a Reader Membership

PDF
EPUB
WEB
APP
302
Pages
About

About

About the Book

This book takes you from zero programming experience through advanced JavaScript mastery, grounded in the ES2026 specification and covering the most important upcoming features like the Temporal API (ES2027). Every concept is explained with clarity and depth: how it works, why it exists, when to use it, what pitfalls to avoid, and how experienced engineers apply it in real projects. You will learn the language itself, the runtime mechanics beneath it, the browser and Node.js environments where it runs, and the modern tooling ecosystem that surrounds it. By the end, you will write idiomatic, production-quality JavaScript with confidence.

Bundle

Bundles that include this book

Author

About the Author

Steve Publications

Steve is a technology professional with more than 20 years of experience in software development, server infrastructure, cybersecurity, vulnerability research and reverse engineering. Throughout his career, he has designed, secured, analyzed and tested complex software and infrastructure, with a particular focus on understanding how systems fail and how they can be made more secure.

Outside of work, Steve enjoys sharing knowledge with the technology community. He collaborates with researchers, industry experts and technology professionals to write practical books covering software development, cybersecurity, cloud computing, networking, DevOps, artificial intelligence and enterprise technologies. His books focus on practical learning through clear explanations, real-world examples and hands-on exercises. With more than two decades of industry experience, his goal is to help IT professionals, students and technology enthusiasts build useful skills and stay current in a rapidly changing industry.

We believe readers deserve to know how our books are created. Most of our authors are not native English speakers, so we use AI to help translate, proofread manuscripts, fix grammar, improve sentence structure and make technical explanations easier to read. AI is used as an editing tool only. It does not replace the research, technical knowledge or hands-on experience behind our books. Some of our authors also prefer to remain anonymous for privacy or professional reasons. In those cases, we publish their work under a different name. The author's name may be different, but the quality of the content and our review process remain the same.

Every book is written, reviewed and maintained by experienced technology professionals, with contributions from our private technical community of more than 420 engineers and researchers from Ukraine, Belarus and Russia. We spend far more time validating technical accuracy and keeping our content up to date than generating text. We are always interested in working with experienced professionals who have deep expertise in a particular technology or domain. If you would like to publish a book with us or help review an existing manuscript, we'd love to hear from you. Send us a message describing your area of expertise. We are especially interested in niche technologies, specialized skills and emerging topics that are underrepresented in existing technical literature.

If you look through the contents of our books, you'll see practical examples, detailed explanations and material that is regularly updated. Our goal is to publish books that professionals can actually rely on, not low-effort AI-generated content. If you ever feel that one of our books does not meet that standard, Leanpub offers a 60-day money-back guarantee. Feel free to request a refund if you are not satisfied with your purchase.

Contents

Table of Contents

From First Line to Production — A Complete Guide to ES2026

Introduction: Why JavaScript, and Why Now

  1. What This Book Covers
  2. How JavaScript Got Here
  3. The ES2026 Landscape
  4. How to Read This Book
  5. What You Will Be Able to Do After This Book

Chapter 1: Getting Started — Your First Steps with JavaScript

  1. Where JavaScript Runs: Browsers, Node.js, and Beyond
  2. Setting Up Your Development Environment
  3. Your First Script: Hello World and What It Means
  4. The JavaScript Console: Your Interactive Playground
  5. Reading and Running Code: Files, Interpreters, and the REPL
  6. How This Book Is Structured
  7. Your Capstone Project: Building a Task Management API
  8. Chapter Summary

Chapter 2: The Foundations — Syntax, Variables, and Data Types

  1. Statements, Expressions, and Program Structure
  2. Variables: let, const, and Why var Is History
  3. Primitive Types: Numbers, Strings, Booleans, null, undefined, Symbol, BigInt
  4. Type Coercion: How JavaScript Converts Values (and When It Bites You)
  5. Operators: Arithmetic, Comparison, Logical, Assignment, and Beyond
  6. Template Literals and Modern String Handling
  7. The typeof Operator and Type Checking
  8. Chapter Summary

Chapter 3: Control Flow — Making Decisions and Repeating Work

  1. Conditional Logic: if, else if, else
  2. The Switch Statement and Pattern Matching Considerations
  3. While Loops and Do…While Loops
  4. For Loops: Classic, Enhanced, and for…of
  5. Breaking and Continuing: Controlling Loop Execution
  6. The Ternary Operator and Concise Conditionals
  7. Chapter Summary

Chapter 4: Functions — The Building Blocks of JavaScript

  1. Defining Functions: Declarations, Expressions, and Arrow Functions
  2. Parameters and Arguments: Default Values, Rest Parameters, Destructuring
  3. Return Values and Early Returns
  4. Scope: Global, Function, Block, and Lexical Environments
  5. Closures: Capturing Environment, Practical Uses, and Pitfalls
  6. Higher-Order Functions and Callbacks
  7. IIFEs and Module-Scope Patterns
  8. Chapter Summary
  9. Project Part 1: Task Management Core Logic

Chapter 5: Objects — Structuring Data and Behavior

  1. Object Literals and Property Access
  2. Creating Objects: Constructors, Factory Functions, and Object.create
  3. Prototype Chains: How Inheritance Really Works
  4. Classes: Syntax, Constructors, Methods, Fields, and Static Members
  5. Getters, Setters, and Computed Properties
  6. Destructuring Assignment for Objects and Arrays
  7. Spread and Rest with Objects
  8. Object Methods: freeze, seal, assign, entries, keys, values
  9. Chapter Summary

Chapter 6: Arrays and Collections — Working with Data Structures

  1. Array Fundamentals: Creation, Access, Mutation
  2. Essential Array Methods: map, filter, reduce, find, some, every
  3. Mutation vs Immutability: push/pop vs concat/spread
  4. Sorting and Searching Arrays
  5. TypedArrays for Binary Data
  6. Modern Collections: Map, Set, WeakMap, WeakSet
  7. Iterators and the Iterable Protocol
  8. Generators and Lazy Evaluation
  9. Chapter Summary

Chapter 7: Asynchronous JavaScript — Handling Time and Concurrency

  1. The Single-Threaded Model: Event Loop, Call Stack, and Task Queue
  2. Callbacks: The Original Pattern and Its Problems
  3. Promises: Creation, Chaining, and Error Handling
  4. async and await: Writing Clean Asynchronous Code
  5. Concurrency Patterns: Promise.all, allSettled, race, any
  6. AbortController and Canceling Operations
  7. ES2026 Async Features and the Evolving Landscape
  8. Chapter Summary
  9. Project Part 2: Adding Async Persistence

Chapter 8: Modules and Code Organization

  1. The Module Problem: Why We Need Modular Code
  2. ES Modules: import, export, and Dynamic Imports
  3. Module Scope and Top-Level await
  4. CommonJS vs ES Modules in Node.js
  5. Bundlers and Build Tools: Vite, esbuild, Rollup, and Webpack
  6. Designing Module Architecture for Large Applications
  7. Circular Dependencies and How to Avoid Them
  8. Chapter Summary

Chapter 9: Error Handling, Debugging, and Testing

  1. Errors in JavaScript: Types, Messages, and Stacks
  2. try…catch…finally: Synchronous Error Handling
  3. Async Error Handling with Promises and await
  4. Custom Error Classes and Error Hierarchies
  5. Debugging: Browser DevTools, Node Inspector, and Console Techniques
  6. Testing Fundamentals: Unit Tests, Integration Tests, and Mocking
  7. Test Frameworks: Vitest, Jest, and Playwright
  8. Chapter Summary

Chapter 10: The JavaScript Runtime — How It All Works Under the Hood

  1. Engines: V8, SpiderMonkey, JavaScriptCore
  2. Compilation: JIT, Bytecode, and Optimization
  3. Memory Management: Allocation, Garbage Collection, and Leaks
  4. The Event Loop in Detail: Microtasks, Macrotasks, and Rendering
  5. Node.js Runtime: libuv, Buffers, Streams, and Clustering
  6. Web Workers and True Parallelism
  7. Hidden Classes and Inline Caching: How V8 Optimizes Objects
  8. Profiling JavaScript Applications: Finding Performance Bottlenecks
  9. Alternative Runtimes: Deno, Bun, and Beyond
  10. Chapter Summary

Chapter 11: Advanced Patterns — Functional Programming, Metaprogramming, and Design

  1. Functional Programming: Pure Functions, Immutability, Currying, Composition
  2. Design Patterns: Module, Factory, Singleton, Observer, Strategy
  3. Decorators: TC39 Stage 3 and Practical Uses
  4. Proxies: Intercepting Operations for Metaprogramming
  5. Reflect API and Dynamic Property Access
  6. Symbols for Private State and Well-Known Keys
  7. Patterns for Large-Scale Applications
  8. TypeScript Advanced Patterns: Utility Types, Generics, and Type Guards
  9. Additional Design Patterns for JavaScript
  10. Chapter Summary

Chapter 12: Browser APIs and the Web Platform

  1. The Document Object Model: Structure, Selection, and Manipulation
  2. Events: Bubbling, Delegation, and Modern Event Handling
  3. Fetch API and HTTP Communication
  4. Storage: localStorage, sessionStorage, IndexedDB, Cookies
  5. Web Components: Custom Elements, Shadow DOM, Templates
  6. Service Workers and Progressive Web Apps
  7. Canvas, WebGL, and Graphics APIs Overview
  8. Chapter Summary

Chapter 13: Ecosystem, Tooling, TypeScript, and Performance

  1. Package Management: npm, yarn, pnpm, and package.json
  2. Modern Build Tools: Vite, Turbopack, esbuild
  3. TypeScript Interoperability: Adding Types to JavaScript
  4. TypeScript Deep Dive: Solving Real Problems with Types
  5. Performance Optimization: Profiling, Lazy Loading, and Memoization
  6. Security Best Practices: XSS, CSRF, Sanitization, CSP
  7. ES2026 Feature Summary: What is New and Why It Matters
  8. The Temporal API: ES2027 and Beyond
  9. ES2025 Features Now Standard
  10. Keeping Current: ECMAScript Process, TC39, and Staying Relevant
  11. Chapter Summary

Chapter 14: Capstone Project — Building a Production-Ready Task Management API

  1. Project Architecture Overview
  2. Step 1: Project Setup
  3. Step 2: Configuration and Error Classes
  4. Step 3: Task Model with Validation
  5. Step 4: Storage Service with Async Persistence
  6. Step 5: Task Service with Business Logic
  7. Step 6: Middleware Layer
  8. Step 7: Controllers and Routes
  9. Step 8: Application Assembly
  10. Step 9: TypeScript Type Definitions
  11. Step 10: Testing the API
  12. What This Project Demonstrates

Conclusion: The Journey Ahead

References

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub