Skip to content

JavaScript Glossary

The JavaScript Glossary collects the concepts and vocabulary that describe how JavaScript code behaves and how it’s organized. It gives learners and developers precise names for what they read in tutorials, pull requests, and AI-written code. Each entry offers a short definition and, where it helps, an example to try in a JavaScript console.

Skim it when a tutorial, a pull request, or an MDN page uses a term like closure, hoisting, or microtask without stopping to explain it.

Topics covered include:

  • Scope and binding: The visibility and availability of names (closure, lexical scope, hoisting, temporal dead zone (TDZ))
  • Values and coercion: The copying, comparison, and conversion of values (primitive, reference, truthy, falsy, type coercion)
  • Objects and prototypes: The sharing of behavior and access to properties (prototype, prototype chain, getter, setter)
  • Functions: The forms and uses of functions (arrow function, callback, higher-order function)
  • Syntax features: The unpacking, combination, and reading of values (destructuring, spread syntax, optional chaining, nullish coalescing)
  • Async and the runtime: The scheduling of work (event loop, call stack, microtask, promise)
  • Errors: The concepts behind failures and their propagation (exception, stack trace, error propagation)
  • Iteration: The protocols behind loops and spread syntax (iterator, iterable, generator)
  • Modules: The organization and sharing of code across files (module, ES modules (ESM), CommonJS)
  • Ecosystem and platform: The language and its implementations (ECMAScript, TC39, Node.js, V8, npm)

Reserved words such as let and await live in JavaScript Keywords. Primitive types such as string and null live in JavaScript Primitive Types, and global objects such as Promise, JSON, and Object live in Standard Built-in Objects. This area picks up the concepts behind them. The idea of a promise and the JSON data format are defined here, while the methods of the Promise and JSON objects are covered in Standard Built-in Objects.

Not sure which term you need? Describe what you’re trying to do, and Mentor AI will point you to the right entries.

  • arrow function A compact function expression written with =>, which takes this and arguments from the surrounding code instead of binding its own.
  • callback A function passed as an argument to another function, which decides when to call it and with which arguments.
  • closure A function that keeps access to the variables of the scope where it was created, even after that scope has finished running.
  • hoisting A behavior that makes declarations usable or visible before the line where they appear, because JavaScript creates bindings when it sets up a scope.
  • lexical scope A rule that resolves each name in JavaScript code to the binding visible where the code is written, not where it’s called.
  • prototype An object that other objects fall back on for properties they don’t have, which lets many objects share one set of methods.
  • prototype chain A series of linked prototype objects that JavaScript searches, in order, when code reads a property that an object doesn’t own.
  • scope A region of a program where a declared name is visible, set by the nested global, module, function, and block scopes around the code.
  • temporal dead zone (TDZ) A period between entering a scope and running a let, const, or class declaration, when reading or writing the declared name throws a ReferenceError.
  • this binding A value that the this keyword refers to during a function call, set by how the function is called rather than where it’s defined.