Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: David Flanagan

JavaScript is the programming language of the web and is used by more software developers today than any other programming language. For nearly 25 years this best seller has been the go-to guide for JavaScript programmers. The seventh edition is fully updated to cover the 2020 version of JavaScript, and new chapters cover classes, modules, iterators, generators, Promises, async/await, and metaprogramming. You’ll find illuminating and engaging example code throughout. This book is for programmers who want to learn JavaScript and for web developers who want to take their understanding and mastery to the next level. It begins by explaining the JavaScript language itself, in detail, from the bottom up. It then builds on that foundation to cover the web platform and Node.js. Topics include: • Types, values, variables, expressions, operators, statements, objects, and arrays • Functions, classes, modules, iterators, generators, Promises, and async/await • JavaScript’s standard library: data structures, regular expressions, JSON, i18n, etc. • The web platform: documents, components, graphics, networking, storage, and threads • Node.js: buffers, files, streams, threads, child processes, web clients, and web servers • Tools and language extensions that professional JavaScript developers rely on

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A comprehensive, example-driven reference that takes you from JavaScript's core syntax all the way to the modern web platform and Node.js. Best for programmers who want one authoritative volume to learn the language properly and then deepen their mastery. 【Book Arc】 - **Opening (~0%–10%)**: Orients you to the book's scope and conventions—how code examples, `// =>` result comments, and assertion-style annotations work—before any real language material begins. - **Early (~10%–35%)**: Builds the language from the bottom up: types, values, variables, expressions, operators, and statements, including subtle rules like optional semicolons, BigInt arithmetic, and scope. - **Middle (~35%–55%)**: Covers control flow and jump statements (`break`, `continue`, labels, `switch`), then moves into objects, arrays, and functions as the working core of the language. - **Late (~55%–80%)**: Advances into classes, modules, iterators, generators, Promises, async/await, and metaprogramming—the modern ES2020 features highlighted in this edition. - **Ending (~80%–100%)**: Extends beyond the language into the web platform (documents, components, graphics, networking, storage, threads) and Node.js (buffers, files, streams, child processes, servers), closing with professional tooling like ESLint, Prettier, Jest, npm, bundling, Babel, JSX, and Flow. 【Key Takeaways】 - **The book is layered by design** (Opening): it deliberately separates the JavaScript language from the host environments, so you can learn the core once and apply it to browsers or Node.js. (Opening) - **Modern syntax is treated as first-class** (Early): BigInt, optional invocation with `?.()`, and other ES2020 additions appear alongside classic operators, so you learn current idioms rather than legacy workarounds. (Early) - **Equality is a recurring trap** (Early): the text stresses the difference between `=`, `==`, and `===`, and warns that `==` is a legacy bug source—use strict equality almost always. (Early) - **Scope and declarations reward careful reading** (Early): `let`/`const` block scoping, redeclaration errors, and the absence of type in declarations are explained with concrete contrast to `var`. (Early) - **Control flow has sharp edges** (Middle): `switch` fall-through, labeled `break`/`continue`, and the rule that jumps cannot cross function boundaries are spelled out to prevent subtle bugs. (Middle) - **Async is a major pillar of this edition** (Late): Promises, async/await, iterators, and generators get dedicated treatment, reflecting how central asynchronous patterns are to real JavaScript. (Late) - **The platform chapters broaden the book's reach** (Ending): web APIs and Node.js turn language knowledge into deployable applications, while the tooling chapter covers the professional workflow around the language. (Ending) 【Reading Tips】 - **Deep-read the early type/operator chapters**: the BigInt and equality discussions are where experienced programmers most often discover gaps in their mental model. - **Skim the statement summary table first, then return**: use it as a map, and only deep-read the jump statements (`break`, `continue`, labels) if you write complex loops. - **Treat the async chapters as a second book**: read them slowly and run the examples; Promises and async/await are where the edition's value is most concentrated. - **Use the platform and Node.js chapters selectively**: if you work only in the browser, skim Node.js; if you work server-side, skim the DOM sections. - **Keep the tooling chapter as a reference**: ESLint, Prettier, Jest, npm, Babel, and Flow are best consulted when you actually set up a project. 【Coverage Limits】 The excerpts cover the book's front matter, core language chapters, control flow, and the table of contents for later chapters; detailed content on classes, modules, async, the web platform, Node.js, and tooling is only partially represented, so those sections are summarized from chapter listings rather than full text.
Excerpt 1
518 15.12 Storage 536 15.13 Worker Threads and Messaging 548 15.14 Example: The Mandelbrot Set 555 15.15 Summary and Suggestions for Further Reading 568 16....
View in text
Excerpt 2
31071n) - 1n // A Mersenne prime with 39457 decimal digits Although the standard +, -, *, /, %, and ** operators work with BigInt, it is important to underst...
View in text
Excerpt 3
eturn x * x; // Return the square of the argument } With this conditional invocation syntax of ES2020, however, you can simply write the function invocation...
View in text
Excerpt 4
tatement can also be used with a label: continue labelname; The continue statement, in both its labeled and unlabeled forms, can be used only within the body...
View in text
Excerpt 5
ray, shifting the existing array elements to higher indexes. The pop() method is the opposite of push(): it removes the last element of the array and returns...
View in text
Excerpt 6
ed again in Chapter 9. 8.7.4 The call() and apply() Methods call() and apply() allow you to indirectly invoke (§8.2.4) a function as if it were a method of s...
View in text
Excerpt 7
very efficient fixed-size set implementation for sets whose 246 | Chapter 9: Classes The module from which a value is imported is specified as a constant str...
View in text
Excerpt 8
hexadecimal number nn; for example, \x0A is the same as \n. 282 | Chapter 11: The JavaScript Standard Library capture groups, the last argument to the replac...
View in text
Tags
AI categories
Programming LanguageJavaScriptWeb Technology
ISBN: 1491952008
Publish Year: 2020
Language: English
Pages: 707
File Format: PDF
File Size: 17.1 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…