JavaScript glossary
250 definitions. Use this reference alongside the code walkthrough rather than trying to memorize it.
Programming
Writing instructions that a computer can execute.
console.log("Hello");Why it matters: Precise vocabulary helps you follow instructions and locate mistakes.
Common misunderstanding: A term names a particular concept, not proof that a program is correct.
Related: Program, Source code · Lesson 1
Program
A collection of instructions intended to accomplish a task.
console.log(2 + 3);
Why it matters: Precise vocabulary helps you follow instructions and locate mistakes.
Common misunderstanding: A term names a particular concept, not proof that a program is correct.
Related: Source code, Instruction · Lesson 1
Source code
The human-readable text of a program.
let score = 1;
Why it matters: Precise vocabulary helps you follow instructions and locate mistakes.
Common misunderstanding: A term names a particular concept, not proof that a program is correct.
Related: Instruction, Statement · Lesson 1
Instruction
An operation described by source code.
console.log("Run");Why it matters: Precise vocabulary helps you follow instructions and locate mistakes.
Common misunderstanding: A term names a particular concept, not proof that a program is correct.
Related: Statement, Expression · Lesson 1
Statement
A complete syntactic unit such as a declaration or expression statement.
let total = 5;
Why it matters: Precise vocabulary helps you follow instructions and locate mistakes.
Common misunderstanding: A term names a particular concept, not proof that a program is correct.
Related: Expression, Value · Lesson 1
Expression
Source that evaluates to a value.
5 * 3
Why it matters: Precise vocabulary helps you follow instructions and locate mistakes.
Common misunderstanding: A term names a particular concept, not proof that a program is correct.
Related: Value, Syntax · Lesson 1
Value
A piece of data that a program can use.
42
Why it matters: Precise vocabulary helps you follow instructions and locate mistakes.
Common misunderstanding: A term names a particular concept, not proof that a program is correct.
Related: Syntax, Comment · Lesson 1
Syntax
The grammatical rules for valid source code.
console.log("Hello");Why it matters: Precise vocabulary helps you follow instructions and locate mistakes.
Common misunderstanding: A term names a particular concept, not proof that a program is correct.
Related: Comment, Identifier · Lesson 1
Comment
Source text ignored during execution and intended for readers.
// Explain the rule.
Why it matters: Precise vocabulary helps you follow instructions and locate mistakes.
Common misunderstanding: A term names a particular concept, not proof that a program is correct.
Related: Identifier, Keyword · Lesson 1
Identifier
A name used to refer to a binding or other program entity.
itemsInCart
Why it matters: Precise vocabulary helps you follow instructions and locate mistakes.
Common misunderstanding: A term names a particular concept, not proof that a program is correct.
Related: Keyword, Semicolon · Lesson 1
Keyword
A word reserved for a language construct.
const
Why it matters: Precise vocabulary helps you follow instructions and locate mistakes.
Common misunderstanding: A term names a particular concept, not proof that a program is correct.
Related: Semicolon, Parentheses · Lesson 1
Semicolon
A statement separator or terminator in source syntax.
let x = 1;
Why it matters: Precise vocabulary helps you follow instructions and locate mistakes.
Common misunderstanding: A term names a particular concept, not proof that a program is correct.
Related: Parentheses, Brace · Lesson 1
Parentheses
Symbols used for grouping or call argument lists.
(5 + 2) * 3
Why it matters: Precise vocabulary helps you follow instructions and locate mistakes.
Common misunderstanding: A term names a particular concept, not proof that a program is correct.
Related: Brace, Bracket · Lesson 1
Brace
A symbol used to delimit blocks or object literals.
if (true) { console.log("yes"); }Why it matters: Precise vocabulary helps you follow instructions and locate mistakes.
Common misunderstanding: A term names a particular concept, not proof that a program is correct.
Related: Bracket, Literal · Lesson 1
Bracket
A symbol used in array literals or property access.
items[0]
Why it matters: Precise vocabulary helps you follow instructions and locate mistakes.
Common misunderstanding: A term names a particular concept, not proof that a program is correct.
Related: Literal, Console · Lesson 1
Literal
Source syntax directly representing a value.
"Hello"
Why it matters: Precise vocabulary helps you follow instructions and locate mistakes.
Common misunderstanding: A term names a particular concept, not proof that a program is correct.
Related: Console, Output · Lesson 1
Console
A diagnostic interface where programs record messages.
console.log("Ready");Why it matters: Precise vocabulary helps you follow instructions and locate mistakes.
Common misunderstanding: A term names a particular concept, not proof that a program is correct.
Related: Output, Input · Lesson 1
Output
An observable result produced by execution.
console.log(15);
Why it matters: Precise vocabulary helps you follow instructions and locate mistakes.
Common misunderstanding: A term names a particular concept, not proof that a program is correct.
Related: Input, Algorithm · Lesson 1
Input
Data supplied to a program or function.
greet("Alex")Why it matters: Precise vocabulary helps you follow instructions and locate mistakes.
Common misunderstanding: A term names a particular concept, not proof that a program is correct.
Related: Algorithm, Variable · Lesson 1
Algorithm
A defined sequence of steps for solving a problem.
Read numbers, add them, display the sum.
Why it matters: Precise vocabulary helps you follow instructions and locate mistakes.
Common misunderstanding: A term names a particular concept, not proof that a program is correct.
Related: Variable, Binding · Lesson 1
Variable
A named binding used to access a value.
let score = 3;
Why it matters: Bindings and types determine how calculations and state updates behave.
Common misunderstanding: The type belongs to the value; const does not deeply freeze an object.
Related: Binding, Declaration · Lesson 6
Binding
The association between a name and a value.
const title = "Course";
Why it matters: Bindings and types determine how calculations and state updates behave.
Common misunderstanding: The type belongs to the value; const does not deeply freeze an object.
Related: Declaration, Assignment · Lesson 6
Declaration
Syntax that introduces a binding.
let count;
Why it matters: Bindings and types determine how calculations and state updates behave.
Common misunderstanding: The type belongs to the value; const does not deeply freeze an object.
Related: Assignment, Reassignment · Lesson 6
Assignment
An operation that stores a value in an existing binding.
count = 2;
Why it matters: Bindings and types determine how calculations and state updates behave.
Common misunderstanding: The type belongs to the value; const does not deeply freeze an object.
Related: Reassignment, let · Lesson 6
Reassignment
Replacing the value associated with a binding.
count = 3;
Why it matters: Bindings and types determine how calculations and state updates behave.
Common misunderstanding: The type belongs to the value; const does not deeply freeze an object.
Related: let, const · Lesson 6
let
A block-scoped declaration that allows reassignment.
let count = 0;
Why it matters: Bindings and types determine how calculations and state updates behave.
Common misunderstanding: The type belongs to the value; const does not deeply freeze an object.
Related: const, var · Lesson 6
const
A block-scoped declaration that prevents reassignment of its binding.
const rate = 0.1;
Why it matters: Bindings and types determine how calculations and state updates behave.
Common misunderstanding: The type belongs to the value; const does not deeply freeze an object.
Related: var, Data type · Lesson 6
var
An older function-scoped declaration with hoisting behavior.
var legacy = 1;
Why it matters: Bindings and types determine how calculations and state updates behave.
Common misunderstanding: The type belongs to the value; const does not deeply freeze an object.
Related: Data type, String · Lesson 6
Data type
A category describing what a value is and which operations apply.
typeof 5
Why it matters: Bindings and types determine how calculations and state updates behave.
Common misunderstanding: The type belongs to the value; const does not deeply freeze an object.
Related: String, Number · Lesson 6
String
A primitive sequence of UTF-16 code units representing text.
"JavaScript"
Why it matters: Bindings and types determine how calculations and state updates behave.
Common misunderstanding: The type belongs to the value; const does not deeply freeze an object.
Related: Number, Boolean · Lesson 6
Number
The standard numeric type using floating-point representation.
3.5
Why it matters: Bindings and types determine how calculations and state updates behave.
Common misunderstanding: The type belongs to the value; const does not deeply freeze an object.
Related: Boolean, null · Lesson 6
Boolean
A primitive logical value, either true or false.
true
Why it matters: Bindings and types determine how calculations and state updates behave.
Common misunderstanding: The type belongs to the value; const does not deeply freeze an object.
Related: null, undefined · Lesson 6
null
An explicit primitive value often representing intentional absence.
const selected = null;
Why it matters: Bindings and types determine how calculations and state updates behave.
Common misunderstanding: The type belongs to the value; const does not deeply freeze an object.
Related: undefined, NaN · Lesson 6
undefined
A primitive often observed when a value was not supplied or returned.
let pending;
Why it matters: Bindings and types determine how calculations and state updates behave.
Common misunderstanding: The type belongs to the value; const does not deeply freeze an object.
Related: NaN, Infinity · Lesson 6
NaN
A numeric value representing an invalid numeric result.
Number("not a number")Why it matters: Bindings and types determine how calculations and state updates behave.
Common misunderstanding: The type belongs to the value; const does not deeply freeze an object.
Related: Infinity, BigInt · Lesson 6
Infinity
A numeric value beyond finite magnitude.
1 / 0
Why it matters: Bindings and types determine how calculations and state updates behave.
Common misunderstanding: The type belongs to the value; const does not deeply freeze an object.
Related: BigInt, Symbol · Lesson 6
BigInt
An integer numeric type for arbitrarily large whole values.
123n
Why it matters: Bindings and types determine how calculations and state updates behave.
Common misunderstanding: The type belongs to the value; const does not deeply freeze an object.
Related: Symbol, Primitive · Lesson 6
Symbol
A primitive value with unique identity, often used as a property key.
Symbol("id")Why it matters: Bindings and types determine how calculations and state updates behave.
Common misunderstanding: The type belongs to the value; const does not deeply freeze an object.
Related: Primitive, Type conversion · Lesson 6
Primitive
A non-object value such as a string, number or Boolean.
typeof "text"
Why it matters: Bindings and types determine how calculations and state updates behave.
Common misunderstanding: The type belongs to the value; const does not deeply freeze an object.
Related: Type conversion, Coercion · Lesson 6
Type conversion
Creating a representation of a value in another type.
Number("12")Why it matters: Bindings and types determine how calculations and state updates behave.
Common misunderstanding: The type belongs to the value; const does not deeply freeze an object.
Related: Coercion, Truthy · Lesson 6
Coercion
Conversion performed implicitly by a language operation.
"5" + 2
Why it matters: Bindings and types determine how calculations and state updates behave.
Common misunderstanding: The type belongs to the value; const does not deeply freeze an object.
Related: Truthy, Falsy · Lesson 6
Truthy
A value that becomes true in Boolean context.
Boolean("hello")Why it matters: Bindings and types determine how calculations and state updates behave.
Common misunderstanding: The type belongs to the value; const does not deeply freeze an object.
Related: Falsy, Immutability · Lesson 6
Falsy
A value that becomes false in Boolean context.
Boolean("")Why it matters: Bindings and types determine how calculations and state updates behave.
Common misunderstanding: The type belongs to the value; const does not deeply freeze an object.
Related: Immutability, Mutation · Lesson 6
Immutability
The property of a value that cannot be changed in place.
"text".toUpperCase()
Why it matters: Bindings and types determine how calculations and state updates behave.
Common misunderstanding: The type belongs to the value; const does not deeply freeze an object.
Related: Mutation, State · Lesson 6
Mutation
Changing the contents of an existing object or array.
items.push("new");Why it matters: Bindings and types determine how calculations and state updates behave.
Common misunderstanding: The type belongs to the value; const does not deeply freeze an object.
Related: State, Reference · Lesson 6
State
The current values relevant to an application.
let count = 0;
Why it matters: Bindings and types determine how calculations and state updates behave.
Common misunderstanding: The type belongs to the value; const does not deeply freeze an object.
Related: Reference, Shallow copy · Lesson 6
Reference
An identity-bearing relationship to an object value.
const other = original;
Why it matters: Bindings and types determine how calculations and state updates behave.
Common misunderstanding: The type belongs to the value; const does not deeply freeze an object.
Related: Shallow copy, Deep copy · Lesson 6
Shallow copy
A new outer object that still shares nested referenced values.
const copy = {...original};Why it matters: Bindings and types determine how calculations and state updates behave.
Common misunderstanding: The type belongs to the value; const does not deeply freeze an object.
Related: Deep copy, Serialization · Lesson 6
Deep copy
A copy that recreates supported nested data rather than sharing it.
structuredClone(record)
Why it matters: Bindings and types determine how calculations and state updates behave.
Common misunderstanding: The type belongs to the value; const does not deeply freeze an object.
Related: Serialization, Condition · Lesson 6
Serialization
Converting a supported value into a transport representation.
JSON.stringify(record)
Why it matters: Bindings and types determine how calculations and state updates behave.
Common misunderstanding: The type belongs to the value; const does not deeply freeze an object.
Related: Condition, Branch · Lesson 6
Condition
An expression used to select a control-flow branch.
score >= 5
Why it matters: Control flow and functions express decisions and reusable rules.
Common misunderstanding: A definition is not a call; returned values and console messages have different roles.
Related: Branch, Loop · Lesson 26
Branch
One possible path chosen by control flow.
if (ready) { run(); }Why it matters: Control flow and functions express decisions and reusable rules.
Common misunderstanding: A definition is not a call; returned values and console messages have different roles.
Related: Loop, Iteration · Lesson 26
Loop
A construct that repeats operations while its rule allows it.
for (let i = 0; i < 3; i++) {}Why it matters: Control flow and functions express decisions and reusable rules.
Common misunderstanding: A definition is not a call; returned values and console messages have different roles.
Related: Iteration, Accumulator · Lesson 26
Iteration
One pass through a loop body.
console.log(i);
Why it matters: Control flow and functions express decisions and reusable rules.
Common misunderstanding: A definition is not a call; returned values and console messages have different roles.
Related: Accumulator, Counter · Lesson 26
Accumulator
A value carrying a running result across iterations.
sum += value;
Why it matters: Control flow and functions express decisions and reusable rules.
Common misunderstanding: A definition is not a call; returned values and console messages have different roles.
Related: Counter, Infinite loop · Lesson 26
Counter
A binding that tracks a changing count or position.
i++
Why it matters: Control flow and functions express decisions and reusable rules.
Common misunderstanding: A definition is not a call; returned values and console messages have different roles.
Related: Infinite loop, Function · Lesson 26
Infinite loop
Repetition whose stopping condition is never reached.
while (true) {}Why it matters: Control flow and functions express decisions and reusable rules.
Common misunderstanding: A definition is not a call; returned values and console messages have different roles.
Related: Function, Parameter · Lesson 26
Function
A callable unit of reusable behavior.
function double(n) { return n * 2; }Why it matters: Control flow and functions express decisions and reusable rules.
Common misunderstanding: A definition is not a call; returned values and console messages have different roles.
Related: Parameter, Argument · Lesson 26
Parameter
A binding declared to receive a function argument.
function greet(name) {}Why it matters: Control flow and functions express decisions and reusable rules.
Common misunderstanding: A definition is not a call; returned values and console messages have different roles.
Related: Argument, Return value · Lesson 26
Argument
A value supplied in a call.
greet("Alex")Why it matters: Control flow and functions express decisions and reusable rules.
Common misunderstanding: A definition is not a call; returned values and console messages have different roles.
Related: Return value, Callback · Lesson 26
Return value
The result given by a function to its caller.
return total;
Why it matters: Control flow and functions express decisions and reusable rules.
Common misunderstanding: A definition is not a call; returned values and console messages have different roles.
Related: Callback, Arrow function · Lesson 26
Callback
A function supplied to another operation for later or repeated invocation.
items.map(double)
Why it matters: Control flow and functions express decisions and reusable rules.
Common misunderstanding: A definition is not a call; returned values and console messages have different roles.
Related: Arrow function, Scope · Lesson 26
Arrow function
A function expression using arrow syntax and lexical this.
n => n * 2
Why it matters: Control flow and functions express decisions and reusable rules.
Common misunderstanding: A definition is not a call; returned values and console messages have different roles.
Related: Scope, Block scope · Lesson 26
Scope
The region in which a binding can be accessed.
{ let local = 1; }Why it matters: Control flow and functions express decisions and reusable rules.
Common misunderstanding: A definition is not a call; returned values and console messages have different roles.
Related: Block scope, Global scope · Lesson 26
Block scope
Visibility limited to the enclosing block.
if (true) { let x = 1; }Why it matters: Control flow and functions express decisions and reusable rules.
Common misunderstanding: A definition is not a call; returned values and console messages have different roles.
Related: Global scope, Local scope · Lesson 26
Global scope
The outer scope for a script environment.
globalThis
Why it matters: Control flow and functions express decisions and reusable rules.
Common misunderstanding: A definition is not a call; returned values and console messages have different roles.
Related: Local scope, Closure · Lesson 26
Local scope
A scope belonging to an inner function or block.
function f() { const local = 1; }Why it matters: Control flow and functions express decisions and reusable rules.
Common misunderstanding: A definition is not a call; returned values and console messages have different roles.
Related: Closure, Call stack · Lesson 26
Closure
A function retaining access to bindings from its creation environment.
function make(n) { return () => n; }Why it matters: Control flow and functions express decisions and reusable rules.
Common misunderstanding: A definition is not a call; returned values and console messages have different roles.
Related: Call stack, Stack frame · Lesson 26
Call stack
The active sequence of function calls waiting to finish.
outer() calls inner()
Why it matters: Control flow and functions express decisions and reusable rules.
Common misunderstanding: A definition is not a call; returned values and console messages have different roles.
Related: Stack frame, Recursion · Lesson 26
Stack frame
The execution context of a particular active function call.
double(4)
Why it matters: Control flow and functions express decisions and reusable rules.
Common misunderstanding: A definition is not a call; returned values and console messages have different roles.
Related: Recursion, Base case · Lesson 26
Recursion
A function invoking itself with a defined stopping case.
factorial(n - 1)
Why it matters: Control flow and functions express decisions and reusable rules.
Common misunderstanding: A definition is not a call; returned values and console messages have different roles.
Related: Base case, Pure function · Lesson 26
Base case
A condition that stops a recursive calculation.
if (n === 0) return 1;
Why it matters: Control flow and functions express decisions and reusable rules.
Common misunderstanding: A definition is not a call; returned values and console messages have different roles.
Related: Pure function, Side effect · Lesson 26
Pure function
A function whose result depends on arguments and does not mutate external state.
n => n * 2
Why it matters: Control flow and functions express decisions and reusable rules.
Common misunderstanding: A definition is not a call; returned values and console messages have different roles.
Related: Side effect, Hoisting · Lesson 26
Side effect
An observable change outside a function’s returned value.
element.textContent = "Updated";
Why it matters: Control flow and functions express decisions and reusable rules.
Common misunderstanding: A definition is not a call; returned values and console messages have different roles.
Related: Hoisting, Temporal dead zone · Lesson 26
Hoisting
The observable early establishment of certain declarations in a scope.
function declarations can be called before their source position
Why it matters: Control flow and functions express decisions and reusable rules.
Common misunderstanding: A definition is not a call; returned values and console messages have different roles.
Related: Temporal dead zone, Destructuring · Lesson 26
Temporal dead zone
The region before a lexical binding is initialized where access throws.
console.log(x); let x = 1;
Why it matters: Control flow and functions express decisions and reusable rules.
Common misunderstanding: A definition is not a call; returned values and console messages have different roles.
Related: Destructuring, Spread syntax · Lesson 26
Destructuring
Syntax extracting values from arrays or object properties.
const {name} = person;Why it matters: Control flow and functions express decisions and reusable rules.
Common misunderstanding: A definition is not a call; returned values and console messages have different roles.
Related: Spread syntax, Rest parameter · Lesson 26
Spread syntax
Syntax expanding iterable elements or copying object properties.
[...items]
Why it matters: Control flow and functions express decisions and reusable rules.
Common misunderstanding: A definition is not a call; returned values and console messages have different roles.
Related: Rest parameter, Default parameter · Lesson 26
Rest parameter
A parameter collecting remaining arguments into an array.
function sum(...values) {}Why it matters: Control flow and functions express decisions and reusable rules.
Common misunderstanding: A definition is not a call; returned values and console messages have different roles.
Related: Default parameter, Array · Lesson 26
Default parameter
An initializer used when an argument is undefined.
function greet(name = "friend") {}Why it matters: Control flow and functions express decisions and reusable rules.
Common misunderstanding: A definition is not a call; returned values and console messages have different roles.
Related: Array, Index · Lesson 26
Array
An ordered, indexed object commonly used as a collection.
["Learn", "Build"]
Why it matters: Collections let a program work with many values while preserving their identities.
Common misunderstanding: An array is an object; copying its binding does not copy its contents.
Related: Index, Element · Lesson 46
Index
A numeric position used to access an array element.
items[0]
Why it matters: Collections let a program work with many values while preserving their identities.
Common misunderstanding: An array is an object; copying its binding does not copy its contents.
Related: Element, Length · Lesson 46
Element
A value stored at an array position.
items[1]
Why it matters: Collections let a program work with many values while preserving their identities.
Common misunderstanding: An array is an object; copying its binding does not copy its contents.
Related: Length, Object · Lesson 46
Length
The array boundary or string code-unit count reported by length.
items.length
Why it matters: Collections let a program work with many values while preserving their identities.
Common misunderstanding: An array is an object; copying its binding does not copy its contents.
Related: Object, Property · Lesson 46
Object
A value that groups named properties and has identity.
{name: "Alex"}Why it matters: Collections let a program work with many values while preserving their identities.
Common misunderstanding: An array is an object; copying its binding does not copy its contents.
Related: Property, Key · Lesson 46
Property
A key-value association on an object.
person.name
Why it matters: Collections let a program work with many values while preserving their identities.
Common misunderstanding: An array is an object; copying its binding does not copy its contents.
Related: Key, Method · Lesson 46
Key
A string or symbol identifying an object property.
"name"
Why it matters: Collections let a program work with many values while preserving their identities.
Common misunderstanding: An array is an object; copying its binding does not copy its contents.
Related: Method, Prototype · Lesson 46
Method
A callable property associated with an object.
text.trim()
Why it matters: Collections let a program work with many values while preserving their identities.
Common misunderstanding: An array is an object; copying its binding does not copy its contents.
Related: Prototype, Class · Lesson 46
Prototype
An object consulted during inherited property lookup.
Object.getPrototypeOf(record)
Why it matters: Collections let a program work with many values while preserving their identities.
Common misunderstanding: An array is an object; copying its binding does not copy its contents.
Related: Class, Instance · Lesson 46
Class
Syntax for defining construction and prototype-based behavior.
class Counter {}Why it matters: Collections let a program work with many values while preserving their identities.
Common misunderstanding: An array is an object; copying its binding does not copy its contents.
Related: Instance, Constructor · Lesson 46
Instance
An object created with a particular constructor.
new Counter()
Why it matters: Collections let a program work with many values while preserving their identities.
Common misunderstanding: An array is an object; copying its binding does not copy its contents.
Related: Constructor, this · Lesson 46
Constructor
A function used to initialize an object through new.
constructor(name) { this.name = name; }Why it matters: Collections let a program work with many values while preserving their identities.
Common misunderstanding: An array is an object; copying its binding does not copy its contents.
Related: this, Getter · Lesson 46
this
A binding whose value depends on the call form, except lexical arrows.
this.name
Why it matters: Collections let a program work with many values while preserving their identities.
Common misunderstanding: An array is an object; copying its binding does not copy its contents.
Related: Getter, Setter · Lesson 46
Getter
An accessor invoked when a property is read.
get total() { return this.price * this.qty; }Why it matters: Collections let a program work with many values while preserving their identities.
Common misunderstanding: An array is an object; copying its binding does not copy its contents.
Related: Setter, Static method · Lesson 46
Setter
An accessor invoked when a property is assigned.
set value(n) { this._value = n; }Why it matters: Collections let a program work with many values while preserving their identities.
Common misunderstanding: An array is an object; copying its binding does not copy its contents.
Related: Static method, Map collection · Lesson 46
Static method
A method available on the class constructor rather than instances.
Math.abs(-2)
Why it matters: Collections let a program work with many values while preserving their identities.
Common misunderstanding: An array is an object; copying its binding does not copy its contents.
Related: Map collection, Set collection · Lesson 46
Map collection
A keyed collection supporting arbitrary value keys.
new Map()
Why it matters: Collections let a program work with many values while preserving their identities.
Common misunderstanding: An array is an object; copying its binding does not copy its contents.
Related: Set collection, Iterable · Lesson 46
Set collection
A collection of unique values.
new Set([1,1,2])
Why it matters: Collections let a program work with many values while preserving their identities.
Common misunderstanding: An array is an object; copying its binding does not copy its contents.
Related: Iterable, Iterator · Lesson 46
Iterable
A value providing an iterator used by constructs such as for...of.
for (const item of items) {}Why it matters: Collections let a program work with many values while preserving their identities.
Common misunderstanding: An array is an object; copying its binding does not copy its contents.
Related: Iterator, HTML · Lesson 46
Iterator
An object producing successive values with next().
items.values()
Why it matters: Collections let a program work with many values while preserving their identities.
Common misunderstanding: An array is an object; copying its binding does not copy its contents.
Related: HTML, CSS · Lesson 46
HTML
The markup language describing webpage structure and content.
<button>Run</button>
Why it matters: Browser vocabulary connects program data to real accessible user interfaces.
Common misunderstanding: A DOM element is an object; inserting untrusted HTML is different from inserting text.
Related: CSS, DOM · Lesson 61
CSS
The styling language describing webpage presentation.
button { color: green; }Why it matters: Browser vocabulary connects program data to real accessible user interfaces.
Common misunderstanding: A DOM element is an object; inserting untrusted HTML is different from inserting text.
Related: DOM, Node · Lesson 61
DOM
The document tree exposed as objects to browser JavaScript.
document.body
Why it matters: Browser vocabulary connects program data to real accessible user interfaces.
Common misunderstanding: A DOM element is an object; inserting untrusted HTML is different from inserting text.
Related: Node, Element node · Lesson 61
Node
An object participating in a document tree.
element.firstChild
Why it matters: Browser vocabulary connects program data to real accessible user interfaces.
Common misunderstanding: A DOM element is an object; inserting untrusted HTML is different from inserting text.
Related: Element node, Text node · Lesson 61
Element node
A node representing an HTML or SVG element.
document.createElement("p")Why it matters: Browser vocabulary connects program data to real accessible user interfaces.
Common misunderstanding: A DOM element is an object; inserting untrusted HTML is different from inserting text.
Related: Text node, Attribute · Lesson 61
Text node
A node containing literal document text.
document.createTextNode("Hello")Why it matters: Browser vocabulary connects program data to real accessible user interfaces.
Common misunderstanding: A DOM element is an object; inserting untrusted HTML is different from inserting text.
Related: Attribute, Selector · Lesson 61
Attribute
A named markup setting associated with an element.
id="result"
Why it matters: Browser vocabulary connects program data to real accessible user interfaces.
Common misunderstanding: A DOM element is an object; inserting untrusted HTML is different from inserting text.
Related: Selector, Event · Lesson 61
Selector
A pattern used to locate matching elements.
#result
Why it matters: Browser vocabulary connects program data to real accessible user interfaces.
Common misunderstanding: A DOM element is an object; inserting untrusted HTML is different from inserting text.
Related: Event, Event listener · Lesson 61
Event
An occurrence dispatched to an event target.
click
Why it matters: Browser vocabulary connects program data to real accessible user interfaces.
Common misunderstanding: A DOM element is an object; inserting untrusted HTML is different from inserting text.
Related: Event listener, Event target · Lesson 61
Event listener
A registered callback invoked for a specified event.
button.addEventListener("click", handler)Why it matters: Browser vocabulary connects program data to real accessible user interfaces.
Common misunderstanding: A DOM element is an object; inserting untrusted HTML is different from inserting text.
Related: Event target, Current target · Lesson 61
Event target
The node where an event originated.
event.target
Why it matters: Browser vocabulary connects program data to real accessible user interfaces.
Common misunderstanding: A DOM element is an object; inserting untrusted HTML is different from inserting text.
Related: Current target, Bubbling · Lesson 61
Current target
The object whose listener is currently running.
event.currentTarget
Why it matters: Browser vocabulary connects program data to real accessible user interfaces.
Common misunderstanding: A DOM element is an object; inserting untrusted HTML is different from inserting text.
Related: Bubbling, Capture phase · Lesson 61
Bubbling
Propagation of an event through ancestor targets after its target phase.
A button click reaches its parent listener.
Why it matters: Browser vocabulary connects program data to real accessible user interfaces.
Common misunderstanding: A DOM element is an object; inserting untrusted HTML is different from inserting text.
Related: Capture phase, Delegation · Lesson 61
Capture phase
The propagation phase traveling toward the target before bubbling.
addEventListener("click", handler, true)Why it matters: Browser vocabulary connects program data to real accessible user interfaces.
Common misunderstanding: A DOM element is an object; inserting untrusted HTML is different from inserting text.
Related: Delegation, Default action · Lesson 61
Delegation
Handling child actions using an ancestor listener.
list.addEventListener("click", handler)Why it matters: Browser vocabulary connects program data to real accessible user interfaces.
Common misunderstanding: A DOM element is an object; inserting untrusted HTML is different from inserting text.
Related: Default action, Form validation · Lesson 61
Default action
A browser behavior associated with an event, such as form navigation.
event.preventDefault()
Why it matters: Browser vocabulary connects program data to real accessible user interfaces.
Common misunderstanding: A DOM element is an object; inserting untrusted HTML is different from inserting text.
Related: Form validation, Accessibility · Lesson 61
Form validation
Checking whether submitted field values satisfy constraints.
input.checkValidity()
Why it matters: Browser vocabulary connects program data to real accessible user interfaces.
Common misunderstanding: A DOM element is an object; inserting untrusted HTML is different from inserting text.
Related: Accessibility, Accessible name · Lesson 61
Accessibility
Designing functionality usable by people with varied access needs.
Use a labeled native button.
Why it matters: Browser vocabulary connects program data to real accessible user interfaces.
Common misunderstanding: A DOM element is an object; inserting untrusted HTML is different from inserting text.
Related: Accessible name, Focus · Lesson 61
Accessible name
The label exposed for an interactive element to accessibility APIs.
aria-label="Increase count"
Why it matters: Browser vocabulary connects program data to real accessible user interfaces.
Common misunderstanding: A DOM element is an object; inserting untrusted HTML is different from inserting text.
Related: Focus, Live region · Lesson 61
Focus
The current keyboard interaction target.
input.focus()
Why it matters: Browser vocabulary connects program data to real accessible user interfaces.
Common misunderstanding: A DOM element is an object; inserting untrusted HTML is different from inserting text.
Related: Live region, Rendering · Lesson 61
Live region
An area whose updates can be announced by assistive technology.
role="status"
Why it matters: Browser vocabulary connects program data to real accessible user interfaces.
Common misunderstanding: A DOM element is an object; inserting untrusted HTML is different from inserting text.
Related: Rendering, Component · Lesson 61
Rendering
Producing visible interface content from current state.
render(records)
Why it matters: Browser vocabulary connects program data to real accessible user interfaces.
Common misunderstanding: A DOM element is an object; inserting untrusted HTML is different from inserting text.
Related: Component, Persistence · Lesson 61
Component
A bounded reusable unit of interface structure and behavior.
createCounter(container)
Why it matters: Browser vocabulary connects program data to real accessible user interfaces.
Common misunderstanding: A DOM element is an object; inserting untrusted HTML is different from inserting text.
Related: Persistence, Origin · Lesson 61
Persistence
Retaining data across a page or application session.
localStorage.setItem(key, text)
Why it matters: Browser vocabulary connects program data to real accessible user interfaces.
Common misunderstanding: A DOM element is an object; inserting untrusted HTML is different from inserting text.
Related: Origin, Sandbox · Lesson 61
Origin
The scheme, host and port used to isolate browser resources.
https://example.test:443
Why it matters: Browser vocabulary connects program data to real accessible user interfaces.
Common misunderstanding: A DOM element is an object; inserting untrusted HTML is different from inserting text.
Related: Sandbox, Web Worker · Lesson 61
Sandbox
A restricted environment limiting the capabilities of executed content.
<iframe sandbox="allow-scripts">
Why it matters: Browser vocabulary connects program data to real accessible user interfaces.
Common misunderstanding: A DOM element is an object; inserting untrusted HTML is different from inserting text.
Related: Web Worker, IndexedDB · Lesson 61
Web Worker
A separate execution context suited to non-DOM JavaScript work.
new Worker(url)
Why it matters: Browser vocabulary connects program data to real accessible user interfaces.
Common misunderstanding: A DOM element is an object; inserting untrusted HTML is different from inserting text.
Related: IndexedDB, localStorage · Lesson 61
IndexedDB
An asynchronous browser database for structured local data.
indexedDB.open("academy", 1)Why it matters: Browser vocabulary connects program data to real accessible user interfaces.
Common misunderstanding: A DOM element is an object; inserting untrusted HTML is different from inserting text.
Related: localStorage, Responsive layout · Lesson 61
localStorage
A per-origin string-keyed browser storage interface.
localStorage.getItem("draft")Why it matters: Browser vocabulary connects program data to real accessible user interfaces.
Common misunderstanding: A DOM element is an object; inserting untrusted HTML is different from inserting text.
Related: Responsive layout, Synchronous · Lesson 61
Responsive layout
An interface adapting to different available display sizes.
@media (max-width: 600px) {}Why it matters: Browser vocabulary connects program data to real accessible user interfaces.
Common misunderstanding: A DOM element is an object; inserting untrusted HTML is different from inserting text.
Related: Synchronous, Asynchronous · Lesson 61
Synchronous
Execution that proceeds in the current call sequence before returning control.
console.log("A"); console.log("B");Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: Asynchronous, Promise · Lesson 81
Asynchronous
Behavior whose result is delivered after the current sequence yields.
setTimeout(handler, 0)
Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: Promise, Fulfillment · Lesson 81
Promise
An object representing eventual fulfillment or rejection.
Promise.resolve(5)
Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: Fulfillment, Rejection · Lesson 81
Fulfillment
Successful settlement of a promise with a value.
resolve(value)
Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: Rejection, Pending · Lesson 81
Rejection
Settlement of a promise with a failure reason.
reject(error)
Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: Pending, async function · Lesson 81
Pending
The unsettled state of a promise.
new Promise(() => {})Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: async function, await · Lesson 81
async function
A function whose call returns a promise.
async function load() { return 1; }Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: await, Task · Lesson 81
await
Syntax that suspends an async evaluation until a value’s promise settles.
const result = await load();
Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: Task, Microtask · Lesson 81
Task
A unit scheduled to run after the current task yields.
A timer callback is a task.
Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: Microtask, Event loop · Lesson 81
Microtask
A scheduled job drained at microtask checkpoints.
Promise.resolve().then(handler)
Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: Event loop, Timer · Lesson 81
Event loop
The scheduling process coordinating tasks, microtasks and rendering opportunities.
A, D, C, B in the prepared example
Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: Timer, API · Lesson 81
Timer
An API scheduling a callback no earlier than a requested delay.
setTimeout(handler, 100)
Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: API, HTTP · Lesson 81
API
A defined interface through which software requests data or behavior.
fetch(url)
Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: HTTP, Request · Lesson 81
HTTP
The request/response protocol used for web resources.
GET /courses
Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: Request, Response · Lesson 81
Request
A message asking a service for a resource or action.
fetch("/data")Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: Response, Status code · Lesson 81
Response
The result message returned by a request operation.
response.status
Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: Status code, Header · Lesson 81
Status code
A numeric indication of an HTTP outcome.
404
Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: Header, JSON · Lesson 81
Header
Metadata associated with a request or response.
Content-Type: application/json
Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: JSON, CORS · Lesson 81
JSON
A text format for structured values with restricted syntax.
{"title":"Course"}Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: CORS, Exception · Lesson 81
CORS
Browser-enforced cross-origin access rules for response visibility.
Access-Control-Allow-Origin
Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: Exception, Runtime error · Lesson 81
Exception
A thrown value interrupting ordinary control flow.
throw new Error("Invalid");Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: Runtime error, Syntax error · Lesson 81
Runtime error
A failure occurring while code executes.
missingName()
Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: Syntax error, Logic error · Lesson 81
Syntax error
A parse failure caused by invalid source grammar.
console.log("unclosed);Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: Logic error, Debugging · Lesson 81
Logic error
Behavior that runs but violates intended requirements.
Using + where multiplication was required
Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: Debugging, Breakpoint · Lesson 81
Debugging
Investigating observed behavior to locate and repair a defect.
Compare expected and actual values.
Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: Breakpoint, Test · Lesson 81
Breakpoint
A debugger stopping point used to inspect an active execution.
Pause at a chosen source line.
Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: Test, Assertion · Lesson 81
Test
A repeatable check of behavior against an independent expectation.
assert.equal(double(2), 4)
Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: Assertion, Boundary case · Lesson 81
Assertion
An explicit condition required by a test.
actual === expected
Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: Boundary case, Regression · Lesson 81
Boundary case
An input at an edge of the defined behavior.
An empty array
Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: Regression, Module · Lesson 81
Regression
A previously working behavior broken by a later change.
A filter now loses saved selections.
Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: Module, Dependency · Lesson 81
Module
A file-level unit with explicit imports and exports.
export function double(n) { return n*2; }Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: Dependency, Refactoring · Lesson 81
Dependency
A module or capability another unit requires.
import {double} from "./math.js";Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: Refactoring, Requirement · Lesson 81
Refactoring
Changing structure while preserving intended behavior.
Extract a tested calculation helper.
Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: Requirement, Deployment · Lesson 81
Requirement
An observable behavior or constraint the application must satisfy.
Blank task names are rejected.
Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: Deployment, Array.map · Lesson 81
Deployment
Making tested application files available in their target environment.
Upload HTML, CSS and JavaScript together.
Why it matters: Async and testing terms distinguish actual observations from assumptions.
Common misunderstanding: A fulfilled request can still have an unsuccessful HTTP status; passing checks do not prove every case.
Related: Array.map, Array.filter · Lesson 81
Array.map
Creates an array from callback results for each existing source element.
[1,2].map(n => n*2)
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Array.filter, Array.find · Lesson 51
Array.filter
Creates an array of elements whose predicate is truthy.
[1,2].filter(n => n>1)
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Array.find, Array.findIndex · Lesson 51
Array.find
Returns the first matching element or undefined.
items.find(x => x.id === 1)
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Array.findIndex, Array.some · Lesson 51
Array.findIndex
Returns the first matching position or -1.
items.findIndex(x => x.done)
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Array.some, Array.every · Lesson 51
Array.some
Reports whether any element satisfies a predicate.
items.some(x => x.done)
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Array.every, Array.reduce · Lesson 51
Array.every
Reports whether all existing elements satisfy a predicate.
items.every(x => x.done)
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Array.reduce, Array.sort · Lesson 51
Array.reduce
Accumulates elements into a single result using a callback.
[1,2].reduce((sum,n)=>sum+n,0)
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Array.sort, Array.slice · Lesson 51
Array.sort
Sorts an array in place using an optional comparison function.
[10,2].sort((a,b)=>a-b)
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Array.slice, Array.splice · Lesson 51
Array.slice
Returns a shallow section with an exclusive end boundary.
items.slice(1,3)
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Array.splice, Array.push · Lesson 51
Array.splice
Removes or inserts elements in place and returns removed elements.
items.splice(1,1)
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Array.push, Array.pop · Lesson 51
Array.push
Appends elements in place and returns the new length.
items.push("new")Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Array.pop, Array.shift · Lesson 51
Array.pop
Removes and returns the last element.
items.pop()
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Array.shift, Array.unshift · Lesson 51
Array.shift
Removes and returns the first element.
items.shift()
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Array.unshift, Array.reverse · Lesson 51
Array.unshift
Prepends elements and returns the new length.
items.unshift("first")Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Array.reverse, Array.includes · Lesson 51
Array.reverse
Reverses an array in place.
items.reverse()
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Array.includes, Array.join · Lesson 51
Array.includes
Tests whether an array contains a value using SameValueZero comparison.
items.includes("Code")Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Array.join, Array.flat · Lesson 51
Array.join
Combines element string representations using a separator.
["a","b"].join("-")Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Array.flat, Array.isArray · Lesson 51
Array.flat
Creates a new array with selected nested levels flattened.
[[1],[2]].flat()
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Array.isArray, String.trim · Lesson 51
Array.isArray
Reports whether a value is an array.
Array.isArray([])
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: String.trim, String.toUpperCase · Lesson 51
String.trim
Returns text without leading and trailing whitespace.
" hi ".trim()
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: String.toUpperCase, String.toLowerCase · Lesson 51
String.toUpperCase
Returns the uppercase form of a string.
"code".toUpperCase()
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: String.toLowerCase, String.slice · Lesson 51
String.toLowerCase
Returns the lowercase form of a string.
"CODE".toLowerCase()
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: String.slice, String.includes · Lesson 51
String.slice
Returns a string section with an exclusive end boundary.
"Code".slice(0,2)
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: String.includes, String.replace · Lesson 51
String.includes
Reports whether one string contains a given substring.
"JavaScript".includes("Script")Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: String.replace, String.replaceAll · Lesson 51
String.replace
Returns a string with the first matching string or matching regex replaced.
"a b".replace(" ","-")Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: String.replaceAll, String.split · Lesson 51
String.replaceAll
Returns a string with all selected matches replaced.
"a a".replaceAll("a","b")Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: String.split, String.startsWith · Lesson 51
String.split
Splits a string into an array using a separator.
"a,b".split(",")Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: String.startsWith, String.endsWith · Lesson 51
String.startsWith
Reports whether a string begins with the supplied text.
"Hello".startsWith("He")Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: String.endsWith, Number.isFinite · Lesson 51
String.endsWith
Reports whether a string ends with the supplied text.
"file.js".endsWith(".js")Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Number.isFinite, Number.isInteger · Lesson 51
Number.isFinite
Checks that a value is a number and has finite magnitude.
Number.isFinite(3)
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Number.isInteger, Number.isNaN · Lesson 51
Number.isInteger
Checks that a numeric value has no fractional component.
Number.isInteger(3)
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Number.isNaN, Object.keys · Lesson 51
Number.isNaN
Checks specifically for the numeric NaN value.
Number.isNaN(NaN)
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Object.keys, Object.values · Lesson 51
Object.keys
Returns an array of enumerable own string property names.
Object.keys({a:1})Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Object.values, Object.entries · Lesson 51
Object.values
Returns an array of enumerable own string property values.
Object.values({a:1})Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Object.entries, Object.fromEntries · Lesson 51
Object.entries
Returns enumerable own string key-value pairs.
Object.entries({a:1})Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Object.fromEntries, Object.hasOwn · Lesson 51
Object.fromEntries
Builds an object from iterable key-value entries.
Object.fromEntries([["a",1]])
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Object.hasOwn, JSON.parse · Lesson 51
Object.hasOwn
Tests whether a property belongs directly to an object.
Object.hasOwn(record,"name")
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: JSON.parse, JSON.stringify · Lesson 51
JSON.parse
Converts valid JSON text into a JavaScript value.
JSON.parse("[1,2]")Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: JSON.stringify, Math.floor · Lesson 51
JSON.stringify
Serializes supported values as JSON text.
JSON.stringify({a:1})Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Math.floor, Math.round · Lesson 51
Math.floor
Rounds a number toward negative infinity.
Math.floor(2.8)
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Math.round, Math.max · Lesson 51
Math.round
Rounds a number to a nearest integer under JavaScript’s tie rules.
Math.round(2.6)
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Math.max, Math.min · Lesson 51
Math.max
Returns the largest supplied numeric value.
Math.max(2,5)
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Math.min, Math.random · Lesson 51
Math.min
Returns the smallest supplied numeric value.
Math.min(2,5)
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Math.random, querySelector · Lesson 51
Math.random
Produces a pseudorandom number from zero inclusive to one exclusive.
Math.random()
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: querySelector, querySelectorAll · Lesson 51
querySelector
Returns the first matching element or null.
document.querySelector("#result")Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: querySelectorAll, textContent · Lesson 51
querySelectorAll
Returns a static NodeList of matching elements.
document.querySelectorAll("button")Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: textContent, classList · Lesson 51
textContent
Reads or sets literal text content of a node.
element.textContent = "Hello";
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: classList, createElement · Lesson 51
classList
Exposes token operations for an element’s class attribute.
element.classList.toggle("active")Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: createElement, append · Lesson 51
createElement
Creates an element without inserting it into the document.
document.createElement("li")Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: append, remove · Lesson 51
append
Adds supplied nodes or strings after existing children.
list.append(item)
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: remove, preventDefault · Lesson 51
remove
Detaches a node from its parent.
item.remove()
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: preventDefault, stopPropagation · Lesson 51
preventDefault
Cancels an event’s cancelable default action.
event.preventDefault()
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: stopPropagation, Promise.all · Lesson 51
stopPropagation
Prevents further propagation without canceling the default action.
event.stopPropagation()
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Promise.all, Promise.allSettled · Lesson 51
Promise.all
Fulfills with all values or rejects when an input rejects.
Promise.all([loadA(),loadB()])
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Promise.allSettled, Promise.resolve · Lesson 51
Promise.allSettled
Collects the fulfillment or rejection outcome of every input.
Promise.allSettled(tasks)
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Promise.resolve, Promise.reject · Lesson 51
Promise.resolve
Adopts a supplied value or promise into a promise.
Promise.resolve(5)
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Promise.reject, finally · Lesson 51
Promise.reject
Creates an already-rejected promise with a reason.
Promise.reject(new Error("No"))Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: finally, AbortController · Lesson 51
finally
Registers cleanup that runs after a promise settles.
request.finally(cleanup)
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: AbortController, requestAnimationFrame · Lesson 51
AbortController
Creates a signal used to request cancellation from supporting APIs.
controller.abort()
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: requestAnimationFrame, MutationObserver · Lesson 51
requestAnimationFrame
Schedules a callback before a future rendering update.
requestAnimationFrame(render)
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: MutationObserver, ResizeObserver · Lesson 51
MutationObserver
Observes selected changes to the DOM tree.
new MutationObserver(handler)
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: ResizeObserver, URLSearchParams · Lesson 51
ResizeObserver
Observes changes to element box sizes.
new ResizeObserver(handler)
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: URLSearchParams, FormData · Lesson 51
URLSearchParams
Reads and writes encoded query parameters.
new URLSearchParams("q=code")Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: FormData, CustomEvent · Lesson 51
FormData
Collects named form values into a form-data entry list.
new FormData(form)
Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: CustomEvent, Operator · Lesson 51
CustomEvent
An event carrying an application-defined detail value.
new CustomEvent("saved", {detail:record})Why it matters: Built-in methods express common transformations with established contracts.
Common misunderstanding: Read whether a method mutates data, returns a value, or only schedules an operation.
Related: Operator, Operand · Lesson 51
Operator
Syntax performing an operation on one or more operands.
5 + 3
Why it matters: Operator choice makes a rule precise enough to test.
Common misunderstanding: A valid expression can still use an operator that does not match the intended requirement.
Related: Operand, Binary operator · Lesson 26
Operand
A value or expression to which an operator is applied.
5 and 3 in 5 + 3
Why it matters: Operator choice makes a rule precise enough to test.
Common misunderstanding: A valid expression can still use an operator that does not match the intended requirement.
Related: Binary operator, Unary operator · Lesson 26
Binary operator
An operator with two operands.
price * quantity
Why it matters: Operator choice makes a rule precise enough to test.
Common misunderstanding: A valid expression can still use an operator that does not match the intended requirement.
Related: Unary operator, Strict equality · Lesson 26
Unary operator
An operator with one operand.
!ready
Why it matters: Operator choice makes a rule precise enough to test.
Common misunderstanding: A valid expression can still use an operator that does not match the intended requirement.
Related: Strict equality, Ternary operator · Lesson 26
Strict equality
An equality comparison that does not coerce different operand types.
5 === "5"
Why it matters: Operator choice makes a rule precise enough to test.
Common misunderstanding: A valid expression can still use an operator that does not match the intended requirement.
Related: Ternary operator, Nullish coalescing · Lesson 26
Ternary operator
A conditional expression selecting one of two values.
ready ? "Go" : "Wait"
Why it matters: Operator choice makes a rule precise enough to test.
Common misunderstanding: A valid expression can still use an operator that does not match the intended requirement.
Related: Nullish coalescing, Optional chaining · Lesson 26
Nullish coalescing
An operator selecting a fallback only for null or undefined.
value ?? "Unknown"
Why it matters: Operator choice makes a rule precise enough to test.
Common misunderstanding: A valid expression can still use an operator that does not match the intended requirement.
Related: Optional chaining, Comparison operator · Lesson 26
Optional chaining
Access syntax that short-circuits on null or undefined.
person.address?.city
Why it matters: Operator choice makes a rule precise enough to test.
Common misunderstanding: A valid expression can still use an operator that does not match the intended requirement.
Related: Comparison operator, Logical operator · Lesson 26
Comparison operator
An operator producing a Boolean comparison result.
score >= 5
Why it matters: Operator choice makes a rule precise enough to test.
Common misunderstanding: A valid expression can still use an operator that does not match the intended requirement.
Related: Logical operator, Template literal · Lesson 26
Logical operator
An operator combining or negating logical conditions with short-circuit behavior where defined.
ready && confirmed
Why it matters: Operator choice makes a rule precise enough to test.
Common misunderstanding: A valid expression can still use an operator that does not match the intended requirement.
Related: Template literal, UTF-16 code unit · Lesson 26
Template literal
A backtick-delimited string form allowing interpolation and line breaks.
`Hello, ${name}`Why it matters: Text indexing needs a clear definition of what is being counted.
Common misunderstanding: One displayed character is not always one UTF-16 code unit.
Related: UTF-16 code unit, Code point · Lesson 23
UTF-16 code unit
A 16-bit storage unit used by JavaScript string indexing and length.
"Code".length
Why it matters: Text indexing needs a clear definition of what is being counted.
Common misunderstanding: One displayed character is not always one UTF-16 code unit.
Related: Code point, Grapheme cluster · Lesson 23
Code point
A numeric identifier in the Unicode character repertoire.
"A".codePointAt(0)
Why it matters: Text indexing needs a clear definition of what is being counted.
Common misunderstanding: One displayed character is not always one UTF-16 code unit.
Related: Grapheme cluster, Event handler · Lesson 23
Grapheme cluster
A sequence of code points commonly perceived as one written character.
A letter combined with an accent
Why it matters: Text indexing needs a clear definition of what is being counted.
Common misunderstanding: One displayed character is not always one UTF-16 code unit.
Related: Event handler, Debouncing · Lesson 23
Event handler
A callback responding to a dispatched event.
button.addEventListener("click", handler)Why it matters: Browser behavior and request boundaries should be designed explicitly.
Common misunderstanding: Timing and policy controls do not automatically establish correctness or authorization.
Related: Debouncing, Throttling · Lesson 89
Debouncing
Delaying work until a specified quiet period follows repeated events.
Schedule search after typing pauses.
Why it matters: Browser behavior and request boundaries should be designed explicitly.
Common misunderstanding: Timing and policy controls do not automatically establish correctness or authorization.
Related: Throttling, Content Security Policy · Lesson 89
Throttling
Limiting how often work may run during repeated events.
Limit a scroll computation to a planned interval.
Why it matters: Browser behavior and request boundaries should be designed explicitly.
Common misunderstanding: Timing and policy controls do not automatically establish correctness or authorization.
Related: Content Security Policy, Source map · Lesson 89
Content Security Policy
A browser-enforced policy restricting resource loading and code execution capabilities.
connect-src 'none'
Why it matters: Browser behavior and request boundaries should be designed explicitly.
Common misunderstanding: Timing and policy controls do not automatically establish correctness or authorization.
Related: Source map, Rate limit · Lesson 89
Source map
Metadata connecting transformed code locations to original source locations.
A debugger maps a bundle line to app.js.
Why it matters: Diagnostics help distinguish a source problem from an infrastructure limit.
Common misunderstanding: A diagnostic aid is evidence to interpret, not permission to ignore failures.
Related: Rate limit, Programming · Lesson 78
Rate limit
A service rule bounding request or resource use over an interval.
Handle an HTTP 429 response without an infinite retry loop.
Why it matters: Diagnostics help distinguish a source problem from an infrastructure limit.
Common misunderstanding: A diagnostic aid is evidence to interpret, not permission to ignore failures.
Related: Programming, Program · Lesson 78