JSJavaScript

JavaScript glossary – key terms explained

async/await

Syntax that makes asynchronous code look like synchronous code: await pauses the async function until a promise is settled.

Callback

A function that is passed to another function and called later, e.g. on a click or after a timer.

Closure

A function that "remembers" variables from the environment where it was created and can still access them later.

Destructuring

A notation for unpacking values from objects and arrays into variables: const { a, b } = obj;.

DOM

Document Object Model: the tree of objects the browser uses to represent a web page and which JavaScript can modify.

ECMAScript

The official standard that JavaScript implements. New versions are released every year (ES2015/ES6 brought let, const, classes and modules).

Engine

A program that executes JavaScript – e.g. V8 (Chrome, Node.js), SpiderMonkey (Firefox), JavaScriptCore (Safari).

ES module

A standardized module system with import and export; one file corresponds to one module with its own scope.

Event loop

The mechanism that processes tasks from queues (microtasks, timers, events) as soon as the call stack is empty.

Hoisting

JavaScript "lifts" declarations to the top of their scope: function declarations and var are usable before their line, let/const are not (temporal dead zone).

JSON

JavaScript Object Notation: a text-based data format that almost every language and every web API understands.

Node.js

A runtime environment that executes JavaScript outside the browser (servers, command-line tools).

npm

The package manager and largest package collection for JavaScript; installs dependencies according to package.json.

Polyfill / Transpiler

Polyfill: a re-implementation of a new feature for old browsers. Transpiler (e.g. Babel, TypeScript): translates new syntax into older syntax.

Promise

An object for a value that is only available later. States: pending, fulfilled, rejected.

Prototype

Every object refers to a prototype object in which missing properties are looked up (prototype chain). The basis of inheritance.

Spread / Rest

The ... operator: as spread it unpacks elements ([...a, ...b]), as rest it collects arguments (function f(...args)).

Strict mode

Stricter rules ("use strict") that, for example, report typos in variable names as errors. Automatically active in modules and classes.

Template literal

A string in backticks with embedded expressions ${...} and support for multiple lines.

Truthy / Falsy

How values count in conditions: falsy are false, 0, "", null, undefined, NaN; everything else is truthy.