Programming Glossary
76 terms covering JavaScript, React, CSS, HTML, TypeScript, data structures, and web development. Each term includes a clear definition and code example.
A
API
Application Programming Interface — a set of rules and endpoints that allow different software systems to communicate. Web APIs typically use HTTP methods (GET, POST, PUT, DELETE) to exchange data in JSON format.
Accessibility
The practice of making web content usable by everyone, including people using screen readers, keyboards, or other assistive technologies. Key practices include semantic HTML, ARIA attributes, alt text, focus management, and color contrast.
Array Methods
Built-in methods on the Array prototype for transforming and querying arrays. Key methods include map (transform each element), filter (select elements), reduce (accumulate), find (first match), some/every (boolean tests), and sort.
Arrow Function
A compact function syntax introduced in ES6. Arrow functions do not have their own this, arguments, or super bindings, making them ideal for callbacks and methods that need to preserve the outer this context.
Async/Await
Syntactic sugar built on top of Promises that makes asynchronous code look and behave like synchronous code. async functions always return a Promise, and await pauses execution until a Promise resolves.
B
Big O Notation
A mathematical notation that describes the upper bound of an algorithm's time or space complexity as input size grows. Common complexities from fastest to slowest: O(1), O(log n), O(n), O(n log n), O(n^2), O(2^n).
Binary Search
An efficient O(log n) search algorithm that works on sorted arrays by repeatedly dividing the search interval in half. Compare the target to the middle element and eliminate half the remaining elements each step.
Binary Tree
A hierarchical data structure where each node has at most two children (left and right). A Binary Search Tree (BST) maintains the property that left children are smaller and right children are larger than the parent.
Box Model
Every HTML element is a rectangular box consisting of content, padding, border, and margin. box-sizing: border-box makes width/height include padding and border, which simplifies layout calculations.
C
CORS
Cross-Origin Resource Sharing — a security mechanism that controls which domains can make requests to your server. Browsers block cross-origin requests by default; servers must include Access-Control-Allow-Origin headers to permit them.
CSS Grid
A CSS layout model for two-dimensional layouts with rows and columns. Grid gives precise control over placement and sizing of elements. More powerful than Flexbox for complex page layouts.
Callback
A function passed as an argument to another function, to be executed later. Callbacks are the foundation of asynchronous JavaScript and are used extensively in event handling and array methods.
Class
ES6 syntactic sugar over JavaScript's prototype-based inheritance. Classes provide a cleaner way to create objects and implement inheritance using extends and super.
Closure
A function that retains access to variables from its outer (enclosing) scope even after the outer function has returned. Closures are created every time a function is created in JavaScript.
Component
A reusable, self-contained piece of UI in React. Components accept inputs (props) and return JSX describing what should appear on screen. Can be functions (recommended) or classes.
Const vs Let vs Var
const declares a block-scoped, read-only reference (the value itself can still be mutated for objects/arrays). let declares a block-scoped, reassignable variable. var declares a function-scoped, hoisted variable. Prefer const by default, let when reassignment is needed, avoid var.
Constructor
A special method inside a class that is called when a new instance is created with the new keyword. It initializes the object's properties and sets up its initial state.
D
DOM
Document Object Model — a tree-structured representation of an HTML document that allows JavaScript to read and manipulate page content, structure, and styles. Every HTML element becomes a node in the DOM tree.
Destructuring
A syntax for extracting values from arrays or properties from objects into distinct variables. Destructuring simplifies code and is commonly used in function parameters, imports, and React hooks.
E
Encapsulation
The practice of bundling data and methods that operate on that data within a single unit, while restricting direct access to some of the object's internals. JavaScript uses closures and private class fields (#) for encapsulation.
Event Bubbling
The DOM event propagation pattern where an event triggered on a child element propagates upward through its ancestors. This allows event delegation — attaching a single listener to a parent to handle events on its children.
Event Listener
A function attached to a DOM element that executes when a specific event (click, keypress, submit, etc.) occurs on that element. Added with addEventListener and removed with removeEventListener.
Event Loop
The mechanism that allows JavaScript to perform non-blocking operations despite being single-threaded. It continuously checks if the call stack is empty, then moves tasks from the callback queue to the call stack for execution.
F
Fetch
The modern browser API for making HTTP requests. fetch() returns a Promise that resolves to the Response object. It replaces the older XMLHttpRequest (XHR) and works with async/await.
Flexbox
A CSS layout model for one-dimensional arrangements (row or column). Flexbox distributes space among items and handles alignment, even when sizes are dynamic. Set display: flex on the container and control children with properties like justify-content, align-items, and flex-grow.
G
Generic
A TypeScript feature that lets you write reusable code that works with multiple types. Generics use type parameters (like <T>) that are specified when the function or class is used.
Git
A distributed version control system that tracks changes to files over time. Git allows multiple developers to work on the same codebase, create branches for features, and merge changes back together.
Graph
A data structure consisting of nodes (vertices) connected by edges. Graphs can be directed or undirected, weighted or unweighted. Used to model networks, social connections, maps, and dependencies.
H
HTTP Methods
Standard request methods that indicate the desired action on a resource. GET retrieves data, POST creates, PUT/PATCH updates, DELETE removes. Each method has semantics about safety and idempotency.
Hash Map
A data structure that maps keys to values using a hash function for O(1) average-case lookups, insertions, and deletions. In JavaScript, plain objects and the Map class serve as hash maps.
Higher-Order Function
A function that either takes one or more functions as arguments, returns a function, or both. Common examples include map, filter, reduce, and forEach.
Hoisting
JavaScript's behavior of moving variable and function declarations to the top of their scope before code execution. var declarations are hoisted and initialized to undefined, while let and const are hoisted but not initialized (temporal dead zone).
I
IIFE
Immediately Invoked Function Expression — a function that runs immediately after being defined. IIFEs create a private scope and are used to avoid polluting the global namespace.
Inheritance
A mechanism where a class (child) derives properties and methods from another class (parent). In JavaScript, inheritance is achieved through the prototype chain or the extends keyword with ES6 classes.
Interface
A TypeScript construct that defines the shape of an object — what properties and methods it must have. Interfaces support extension, optional properties, and readonly modifiers. They're erased at compile time.
J
JSON
JavaScript Object Notation — a lightweight text format for data exchange. JSON supports strings, numbers, booleans, null, objects, and arrays. It's the standard format for API responses and configuration files.
JSX
A syntax extension for JavaScript that looks like HTML and is used to describe UI in React. JSX is compiled to React.createElement() calls. It supports JavaScript expressions inside curly braces {}.
JWT
JSON Web Token — a compact, URL-safe token format for securely transmitting information between parties. A JWT has three parts: header, payload, and signature. Commonly used for authentication in APIs.
L
Linked List
A linear data structure where each element (node) contains a value and a pointer to the next node. Unlike arrays, linked lists don't require contiguous memory and allow O(1) insertions at the head, but have O(n) random access.
Local Storage
A web browser API for storing key-value pairs persistently (survives browser restarts). Limited to ~5MB per origin, stores strings only. Use JSON.stringify/JSON.parse for objects. Session Storage is similar but clears when the tab closes.
M
Map
A built-in collection that stores key-value pairs where keys can be any type (not just strings). Maps maintain insertion order and provide O(1) lookup. Unlike plain objects, Maps don't have prototype pollution concerns.
Media Query
A CSS feature that applies styles conditionally based on the device's characteristics (width, height, orientation, color scheme). Media queries are the foundation of responsive design.
Module
A self-contained unit of code that exports specific values (functions, objects, classes) and imports what it needs from other modules. ES modules use import/export syntax.
N
Nullish Coalescing
The ?? operator that returns the right-hand operand when the left-hand operand is null or undefined. Unlike ||, it does not treat 0, '', or false as nullish, making it safer for default values.
npm
Node Package Manager — the default package manager for Node.js. npm manages project dependencies, runs scripts, and publishes packages. The package.json file lists dependencies and the node_modules folder stores them.
O
P
Polymorphism
The ability for different classes to respond to the same method call in different ways. In JavaScript, polymorphism is achieved through method overriding in subclasses and duck typing.
Promise
An object representing the eventual completion or failure of an asynchronous operation. A Promise is in one of three states: pending, fulfilled, or rejected. Promises can be chained with .then() and .catch().
Props
Short for properties — the mechanism for passing data from parent to child components in React. Props are read-only and flow downward (one-way data flow). Destructure props in function parameters for clean code.
Prototype
Every JavaScript object has a hidden internal property called [[Prototype]] that links to another object. When a property is accessed on an object and not found, JavaScript walks up the prototype chain to find it. This is the basis of JavaScript's inheritance model.
Q
Query Selector
document.querySelector() returns the first element matching a CSS selector. querySelectorAll() returns all matching elements as a NodeList. These are the modern replacements for getElementById and getElementsByClassName.
Queue
A First-In-First-Out (FIFO) data structure where elements are added at the back and removed from the front. Used in BFS, task scheduling, and message queues. Common operations: enqueue (add), dequeue (remove), peek (view front).
R
REST
Representational State Transfer — an architectural style for designing networked APIs. RESTful APIs use HTTP methods to perform CRUD operations on resources identified by URLs. Responses are typically JSON.
Recursion
A technique where a function calls itself to solve smaller instances of the same problem. Every recursive function needs a base case (stopping condition) and a recursive case. Common in tree traversals, divide-and-conquer algorithms, and mathematical computations.
Responsive Design
An approach to web design that makes pages look good on all screen sizes. Responsive design uses fluid grids, flexible images, and CSS media queries to adapt layouts from mobile to desktop.
Rest Parameters
The ... syntax used in function parameters to collect all remaining arguments into an array. Unlike the arguments object, rest parameters produce a real array.
S
Scope
The region of code where a variable is accessible. JavaScript has global scope, function scope, and block scope. Block scope was introduced with let and const in ES6.
Semantic HTML
Using HTML elements that convey meaning about the content they contain, rather than just presentation. Elements like <article>, <nav>, <header>, <main>, and <section> improve accessibility, SEO, and code readability.
Set
A built-in collection that stores unique values of any type. Duplicate values are automatically ignored. Sets provide O(1) add/delete/has operations and are useful for deduplication.
Sorting Algorithm
An algorithm that arranges elements in a specific order. Common algorithms include Bubble Sort O(n^2), Merge Sort O(n log n), and Quick Sort O(n log n) average. JavaScript's built-in Array.sort() uses Timsort.
Spread Operator
The ... syntax that expands an iterable (array, string, object) into individual elements. Used for copying arrays/objects, merging, and passing multiple arguments to functions.
Stack
A Last-In-First-Out (LIFO) data structure where elements are added and removed from the same end (the top). The JavaScript call stack is a stack. Common operations: push (add to top), pop (remove from top), peek (view top).
State
Data that a component manages internally and can change over time. When state updates, React re-renders the component. Use useState for simple state and useReducer for complex state logic.
Strict Equality
The === operator that checks both value and type without type coercion. Unlike == (loose equality), strict equality does not convert operands before comparing. Always prefer === over ==.
String Methods
Built-in methods on the String prototype for searching, transforming, and extracting parts of strings. Common methods include includes, startsWith, endsWith, slice, split, trim, replace, and toLowerCase.
T
Template Literal
Strings delimited by backticks that allow embedded expressions via ${expression} syntax. Template literals support multi-line strings and tagged templates for custom string processing.
Temporal Dead Zone
The period between entering a scope and the point where a let or const variable is declared. Accessing the variable during this period throws a ReferenceError. This prevents bugs caused by using variables before they are initialized.
This Keyword
A special keyword that refers to the object a function is called on. Its value depends on how a function is invoked: in a method, this refers to the owner object; in a regular function, it defaults to globalThis (or undefined in strict mode).
Truthy and Falsy
In JavaScript, every value is either truthy or falsy when evaluated in a boolean context. Falsy values are: false, 0, '', null, undefined, NaN, and 0n. Everything else is truthy, including empty arrays and objects.
Try/Catch
A statement for handling runtime errors gracefully. Code in the try block is executed, and if it throws an error, execution jumps to the catch block. The finally block runs regardless of success or failure.
Type Coercion
JavaScript's automatic conversion of values from one type to another during operations. Implicit coercion happens with operators like ==, +, and in boolean contexts. Explicit coercion uses functions like Number(), String(), Boolean().
TypeScript
A typed superset of JavaScript that adds static type checking at compile time. TypeScript catches type errors before runtime, provides better IDE support (autocompletion, refactoring), and compiles to plain JavaScript.
U
useEffect
A React hook for performing side effects in function components — fetching data, setting up subscriptions, or manually updating the DOM. Runs after every render by default; use the dependency array to control when it runs.
useMemo
A React hook that memoizes the result of an expensive computation, recomputing only when its dependencies change. Use it to optimize performance by avoiding unnecessary recalculations on every render.
V
Variable
A named container that stores a value in memory. JavaScript uses let, const, and var to declare variables. let and const are block-scoped, while var is function-scoped.
Virtual DOM
An in-memory representation of the real DOM that React uses to optimize updates. When state changes, React creates a new virtual DOM tree, diffs it against the previous one, and applies only the minimum necessary changes to the real DOM.
See how these concepts compare side by side in our JavaScript Comparisons or start learning with interactive tutorials.