Appendices
Quick reference, common errors, glossary, further resources, and exercise solutions.
Chapters
Appendix A: JavaScript quick reference
Appendix B: common errors and how to fix them
Appendix C: glossary
Argument: A value passed into a function call. Array: A list-like object that stores values by index. Asynchronous: Code that starts now and finishes later. Boolean: A value that is either `true` or `false`. Callback: A function passed to another function. Class: Syntax for creating objects with shared behavior. Closure: A function that remembers variables from the scope where it was created. DOM: The browser's JavaScript model of a web page. Event: Something that happens in the browser, such as a click or key press. Expression: Code that produces a value. Function: A reusable block of instructions. JSON: A text format often used for sending data between programs. Method: A function stored as an object property. Module: A JavaScript file that imports or exports code. Node.js: A JavaScript runtime outside the browser. Object: A collection of properties. Parameter: A named input inside a function definition. Promise: An object that represents a future result. Property: A named value on an object. Scope: The area where a variable can be used. String: Text. Variable: A name that refers to a value. Accumulator: A variable that collects a result over time. API: A defined way for programs to communicate. Argument: A value passed into a function call. Attribute: Extra information on an HTML element. Call stack: The stack of active function calls. Coercion: Automatic type conversion. Constructor: A class method that initializes a new instance. Data type: A category of value. DevTools: Browser tools for inspecting pages and debugging code. Element: A DOM node created from an HTML tag. Endpoint: A specific API URL. Event listener: A function registered to run when an event happens. Expression: Code that produces a value. Factory: A function that creates objects. Falsy: A value that behaves like `false` in a condition. Fetch: A browser function for making HTTP requests. Garbage collection: Automatic memory cleanup. Hoisting: Declaration preparation before code runs. Index: A position in an array or string, starting at `0`. localStorage: Browser storage for string data. Map: A key-value collection. Mutation: A change to an existing value. Nullish coalescing: Fallback syntax using `??`. Optional chaining: Safe nested property access using `?.`. Prototype: An object used for shared inheritance. Pure function: A function with no side effects. Runtime: A program that runs code. Selector: Text used to find DOM elements. Set: A collection of unique values. Side effect: A change or interaction outside a function. Truthy: A value that behaves like `true` in a condition.
Appendix D: resources for continued learning
MDN Web Docs is the best general reference for JavaScript, HTML, CSS, browser APIs, and web platform behavior. The JavaScript.info tutorial gives detailed explanations and many examples. The Node.js documentation explains built-in Node modules, command line usage, and runtime behavior. The npm documentation explains packages, scripts, project metadata, and publishing. After finishing this book, build small projects that force you to combine ideas. Good next projects include a calculator, quiz app, notes app, expense tracker, markdown previewer, memory game, recipe search, and small API dashboard. When you are ready for a framework, choose one and stay with it long enough to build several projects. React, Vue, and Svelte are all reasonable choices. The best first framework is the one you will actually use to finish something.
Appendix E: solutions to exercises
These solutions show one possible answer. Your code may be different and still be correct.