Programming Glossary

76 terms covering JavaScript, React, CSS, HTML, TypeScript, data structures, and web development. Each term includes a clear definition and code example.

JavaScript (39)Data Structures (10)Web (8)React (7)CSS (5)TypeScript (3)HTML (2)Tooling (2)

A

B

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.

Web

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.

CSS

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.

JavaScript

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.

JavaScript

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.

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.

React

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.

JavaScript

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.

JavaScript

D

E

F

G

H

I

J

L

M

N

O

P

Q

R

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.

JavaScript

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.

HTML

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.

JavaScript

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.

Data Structures

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.

JavaScript

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).

Data Structures

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.

React

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 ==.

JavaScript

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.

JavaScript

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.

JavaScript

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.

JavaScript

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).

JavaScript

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.

JavaScript

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.

JavaScript

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().

JavaScript

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.

TypeScript

U

V

See how these concepts compare side by side in our JavaScript Comparisons or start learning with interactive tutorials.