The Glossary of JavaScript
Core Concepts
Interpreter / JIT Compiler — JavaScript engines like V8 (Chrome, Node.js) and SpiderMonkey (Firefox) parse source code and execute it, using a Just-In-Time compiler that optimizes "hot" code paths into machine code as the program runs, rather than compiling everything upfront.
ECMAScript — The standardized specification that JavaScript implements; version numbers like ES6/ES2015, ES2020, and ES2023 refer to yearly ECMAScript releases, each adding new language features.
Dynamic Typing — The property that variable types are checked at runtime rather than compile time, so a variable can be reassigned a value of a different type at any point in a program.
Weak Typing — JavaScript's tendency to implicitly convert values between types during operations ("5" + 3 becomes "53", "5" - 3 becomes 2), a frequent source of bugs and the reason strict equality (===) is generally preferred over loose equality (==).
Prototype — The mechanism underlying inheritance in JavaScript: every object has an internal link to another object (its prototype) that it falls back on when a property isn't found on itself directly, forming a "prototype chain."
this — A keyword whose value is determined by how a function is called (as a method, standalone, with new, or via call/apply/bind), rather than by where the function is defined — one of the most commonly misunderstood parts of the language.
Hoisting — JavaScript's behavior of moving variable and function declarations to the top of their scope during compilation, before code executes — the reason a function declaration can be called before it appears in the source, while a var exists but is undefined until its actual line runs.
Scope — The region of code where a given variable is accessible; JavaScript has global scope, function scope (var), and block scope (let/const), the last introduced in ES6 to close over long-standing footguns with var.
Closure — A function that retains access to variables from the scope in which it was defined, even after that outer scope has finished executing — the basis for patterns like private state, memoization, and module encapsulation.
Event Loop — The mechanism that lets JavaScript, a single-threaded language, handle asynchronous operations without blocking: it continuously checks a call stack and task queues, running queued callbacks once the stack is empty.
Data Structures
Array — An ordered, mutable, resizable list-like object, JavaScript's default general-purpose collection, with built-in methods like map, filter, and reduce for functional-style transformations.
Object — A collection of key-value pairs (properties), JavaScript's fundamental data structure — used both as general-purpose maps and as the basis for everything from function definitions to class instances.
Map / Set — ES6 additions offering, respectively, a true key-value collection where keys can be any type (unlike plain objects, which coerce keys to strings) and a collection of unique values, both with predictable iteration order.
WeakMap / WeakSet — Variants of Map and Set that hold their keys weakly, meaning entries can be garbage-collected once no other reference to the key exists — useful for attaching metadata to objects without causing memory leaks.
Destructuring — A syntax for unpacking values from arrays or properties from objects into distinct variables in a single expression (const { name, age } = user), introduced in ES6.
Spread / Rest Operator (...) — The same three-dot syntax used two ways: spreading an iterable's elements into a new array, object, or argument list, or collecting multiple arguments/properties into a single array or object.
Template Literal — String literals delimited by backticks that support embedded expressions Hello, ${name}) and multi-line strings without escape characters, introduced in ES6 as an alternative to string concatenation.
JSON (JavaScript Object Notation) — A lightweight, text-based data format derived from JavaScript's object literal syntax, now language-agnostic and the de facto standard for data exchange between web clients and servers.
Functions & Object-Oriented JavaScript
Function Declaration / Expression — Two ways of defining a function: a declaration (function foo() {}), which is hoisted, versus an expression (const foo = function() {}), which is not and behaves like any other variable assignment.
Arrow Function — A concise function syntax ((a, b) => a + b) introduced in ES6 that, notably, does not bind its own this, instead inheriting it from the enclosing scope — a distinction that resolves many classic this-related bugs.
Callback — A function passed as an argument to another function, to be invoked later — the original mechanism for handling asynchronous work in JavaScript, before Promises and async/await existed.
Higher-Order Function — A function that takes another function as an argument, returns a function, or both — the foundation of array methods like map and filter, and of patterns like currying and composition.
IIFE (Immediately Invoked Function Expression) — A function defined and executed in the same statement ((function() { ... })()), historically used to create an isolated scope and avoid polluting the global namespace before block scoping and modules existed.
Class — Syntactic sugar introduced in ES6 over JavaScript's existing prototype-based inheritance, providing a more familiar class/extends/constructor syntax without changing the underlying object model.
Constructor — A special method (named constructor inside a class, or any function invoked with new) that initializes a newly created object's properties.
new Keyword — The operator that creates a new object, links its prototype to the constructor's prototype property, executes the constructor with this bound to the new object, and returns it.
Getter / Setter — Special methods (get/set) that let a property's read or write behave like a function call behind the scenes, allowing computed or validated values while keeping plain-looking property access.
Currying — Transforming a function that takes multiple arguments into a sequence of functions that each take a single argument, enabling partial application — a common pattern in functional JavaScript.
Asynchronous JavaScript
Promise — An object representing the eventual completion (or failure) of an asynchronous operation, with three states — pending, fulfilled, rejected — that replaced deeply nested callbacks ("callback hell") as the standard async pattern.
async / await — Syntax introduced in ES2017 that lets asynchronous, Promise-based code be written and read like synchronous code: async marks a function as returning a Promise, and await pauses execution within it until a Promise resolves.
Call Stack — The structure JavaScript uses to track function calls currently in progress, following a last-in-first-out order; a function that never returns (like infinite recursion) causes a "stack overflow."
Task Queue (Macrotask Queue) — The queue holding callbacks from things like setTimeout and DOM events, processed by the event loop one at a time, only after the call stack is empty.
Microtask Queue — A higher-priority queue (holding Promise callbacks, among others) that the event loop fully drains after every single task, and before moving on to the next macrotask — the reason Promise callbacks generally run before setTimeout callbacks even at a delay of zero.
fetch — The modern, Promise-based browser and Node.js API for making HTTP requests, largely superseding the older callback-based XMLHttpRequest.
Debounce / Throttle — Two techniques for limiting how often a function runs in response to rapid events (like scrolling or typing): debouncing delays execution until activity stops, while throttling caps execution to a fixed rate.
Modules & the Modern Language
Module - self-contained file of code that explicitly declares what it shares with other files (exports) and what it needs from other files (imports).
Generator Function — A function (function*) that can pause and resume its execution using yield, producing a sequence of values lazily — the mechanism underpinning custom iterators and, historically, early async patterns.
Iterator / Iterable Protocol — The built-in interfaces (Symbol.iterator and a next() method) that let objects define custom iteration behavior, making them usable in for...of loops and with the spread operator.
Ecosystem & Tooling
Node.js — A JavaScript runtime.
Webpack / Vite / esbuild — Build tools and bundlers that combine, transform, and optimize JavaScript (and related assets) for the browser; Vite and esbuild have gained ground over Webpack for their significantly faster development builds.
Babel — A transpiler that converts modern JavaScript syntax into older, more widely supported versions, letting developers use new language features while maintaining compatibility with older browsers.
ESLint / Prettier — The standard tools for, respectively, linting (catching bugs and enforcing code-quality rules) and formatting (enforcing consistent style) JavaScript codebases.
Jest / Vitest — Widely used testing frameworks for JavaScript, providing test runners, assertion libraries, and mocking utilities; Vitest has emerged as a faster, Vite-native alternative to Jest.
DOM (Document Object Model) — The browser's tree-structured, in-memory representation of an HTML page, which JavaScript manipulates to read and update what's displayed — the interface that makes JavaScript useful for interactive web pages in the first place.
Express / Fastify — Minimalist server-side frameworks for building HTTP APIs on Node.js, providing routing, middleware, and request/response handling on top of Node's core http module.
Deno / Bun — Newer JavaScript runtimes positioned as alternatives to Node.js, built around modern defaults like native TypeScript support and, in Bun's case, an emphasis on raw execution speed.
Taken together, this glossary traces JavaScript's unusual path from a scripting language written in ten days to run inside Netscape Navigator, to the language that now runs the browser, the server, and a fair amount of everything in between. Callback hell gave way to Promises and then to async/await; var's scoping quirks gave way to let and const; a single, informal spec gave way to yearly ECMAScript releases with real governance. Each term here marks a point where the language's early, hastily-made decisions met the pressure of running at planetary scale — and, more often than not, JavaScript patched around them rather than starting over.
*written with Claude Sonnet 5