JavaScript glossary

279 JavaScript terms, from Novice to Master. Start with the basics or jump to a level.

Updated

Novice

<script> Element
An HTML element that loads or contains JavaScript for a web page.
Arithmetic Operators
The math symbols: + - * / // % **.
Arithmetic Operators (JavaScript)
3 + 4 // addition
Array - Access Element - JavaScript
Array indexes are 0 based.
Array - JavaScript
An array is a collection of multiple values in a single variable.
Assignment
Storing a value in a variable with a single =.
BigInt
A numeric primitive for integers larger than Number can safely represent.
Block Scope
The region inside braces where let and const declarations are available.
Browser Console
A browser development panel for inspecting messages, errors, and JavaScript values.
camelCase
A naming style that starts lowercase and capitalizes each later word.
Character - JavaScript
A character is a single letter, digit, punctuation or any other special character.
Comment
Text written for people reading the code that the JavaScript engine ignores.
Comparison Operators
Symbols like == and < that compare two values and answer True or False.
console.log()
A method that writes a value to the runtime's development console.
const
A keyword that declares a block-scoped variable that can't be given a new value.
ECMAScript
The language standard that defines how JavaScript syntax and behavior work.
else Statement
A branch that runs when its matching if condition is falsy.
Falsy
A value treated as false when JavaScript evaluates it as a condition.
if Statement
Runs a block of code only when a condition is true.
JavaScript
A programming language used to add behavior to web pages and build applications in browsers, servers, and other runtimes.
JavaScript Data Types
JavaScript basic data types are string, number and boolean.
JavaScript Engine
Software that reads and executes JavaScript code.
JavaScript Runtime
An environment combining a JavaScript engine with APIs such as timers, files, or browser features.
JavaScript variable
A variable is a named alias for a value that you want to use in your application.
let
A keyword that declares a block-scoped variable that can be reassigned.
Logical Operators
and, or and not: they combine True/False checks.
Naming Conventions (JavaScript)
JavaScript predominantly uses 2 naming conventions: camelCase and PascalCase.
NaN
A special Number value meaning the result is not a valid number.
Node.js
A JavaScript runtime commonly used for servers, command-line tools, and automation.
null
A primitive value deliberately used to represent no object or value.
Number
JavaScript's main numeric type for both whole and fractional numbers.
Primitive Value
A value that is not an object, such as a string, number, boolean, null, or undefined.
Runtime Error
A problem that occurs while a compiled program is running.
Script
A file or block of JavaScript code that a browser or another runtime can execute.
Semicolon
A punctuation mark that can end a JavaScript statement.
Snake Case
All letters are lower case, each word is separated by an underscore.
Strict Equality (===)
A comparison that requires equal values and matching types without coercion.
String
Text inside quotes, like \"hello\" or 'coffee'.
String - JavaScript
A string is a series of characters (letters and/or digits).
String Interpolation
Placing an expression inside ${} so its value becomes part of a template literal.
switch Statement
A statement that selects a code path by matching one value against cases.
Syntax Error
An error caused by code that does not follow JavaScript's grammar.
Template Literal
A string enclosed by backticks that supports interpolation and multiple lines.
Truthy
A value treated as true when JavaScript evaluates it as a condition.
Type Coercion
JavaScript's conversion of a value from one type to another, either automatically or explicitly.
typeof Operator
An operator that returns a string describing a value's basic type.
undefined
The primitive value used when a value has not been assigned or is missing.
var
An older keyword for declaring a variable that belongs to the whole function, not just the block it's in.
Variable
A name that holds a value, like a labelled box.
Variable Declaration
A statement that creates a variable name with let, const, or var.

Apprentice

Argument
The actual value you hand to a function when you call it.
Arguments (JavaScript)
An argument is any value that is passed into a function when calling the function.
Array
A fixed-size, indexed collection whose elements all have the same type.
Array - Mixed Types - JavaScript
TRUE - JavaScript arrays can contain multiple types in the same array.
Array Destructuring
Syntax that extracts array items by position into variables.
Array Index
A zero-based number that identifies an element's position in an array.
Array Length
The fixed number of elements an array can hold.
Arrow Function
A compact function expression written with the => symbol.
Bracket Notation
Accessing an object property with a key expression inside square brackets.
break
Stops a loop immediately.
Callback Function
A function passed to other code to be called later or during an operation.
continue
Skips to the next pass of the loop.
Date Object
A built-in object representing a single moment in time.
Default Parameter
A parameter value used when the caller supplies undefined or omits the argument.
describe, it and expect
Group tests, define tests, and assert results.
do...while Loop
A loop that runs its body once before checking whether to repeat.
Dot Notation
Accessing an object property with a dot followed by its name.
Escape Sequence
A backslash code that represents a special character inside a string or character literal.
Event - JavaScript
An event is an any action that can happen that your application can monitor.
for Loop
Repeats code once for each item in a collection.
for...in Loop
A loop that visits an object's enumerable property names.
for...of Loop
A loop that visits the values produced by an iterable.
Function
A reusable block of code that can receive values and return a result.
Function Declaration
A named function created with the function keyword as a statement.
Function Expression
A function created as part of an expression and commonly assigned to a variable.
Function Signature (JavaScript)
Functions have a signature, this is how the JavaScript runtime knows what code block to…
Global Scope
The outermost scope, whose declarations may be available across a script or module.
How to call a function
A function is called by specifying the name of the function followed by parentheses and…
includes()
A method that reports whether an array contains a value or a string contains text.
Jest
A popular JavaScript test framework.
join()
Glues a list of strings into one string with a separator between them.
JSON Object
A built-in object with methods for converting between JavaScript values and JSON text.
Key-Value Pair
One entry in a dictionary: a key and the value stored under it.
Local Scope
A function or block scope where declarations are available only inside that area.
Looping Logic
Math Object
A built-in object containing mathematical constants and functions.
Math.random()
A method that returns a pseudorandom double from 0.0 up to, but not including, 1.0.
Method
A function that belongs to a class, called on an object with a dot.
Nested Array
An array containing one or more arrays as its items.
Nested Loop
A loop inside another loop.
Nullish Coalescing
The ?? operator, which uses a fallback only when its left value is null or undefined.
Object
A class instance that combines its own state with available behavior.
Object - JavaScript
A JavaScript object gives you the ability to store multiple related variables in the same…
Object Destructuring
Syntax that extracts named object properties into variables.
Object Literal
Brace syntax that creates an object from a list of properties.
Optional Chaining
The ?. operator, which stops and returns undefined when the value before it is nullish.
Parameter
A name in a function definition for a value the function needs.
Parameter (JavaScript)
A parameter (also known as an input parameter) is a way of receiving a variable into a…
Parameters and Arguments (JavaScript)
A parameter is defined by the function to specify what input is required to call the…
parseFloat()
A function that reads a decimal number from the beginning of a string.
parseInt()
A function that reads a whole number from the beginning of a string.
pop()
Removes an item from a list and hands it back (the last one by default).
Property
A member that exposes a value through get and set accessors.
push()
An Array method that adds values to the end and returns the new length.
Rest Parameter
A final function parameter beginning with ... that collects remaining arguments into an array.
Return Value
The result a function hands back with return.
Return Value (JavaScript)
Functions may or may not return a response value when they are called.
Scope
Where in the code a variable can be used.
shift()
An Array method that removes and returns the first item.
slice()
A method that returns a selected portion without changing the original array or string.
splice()
An Array method that removes, replaces, or inserts items by changing the original array.
split()
Breaks a string into a list of pieces.
Spread Syntax
The ... syntax that expands values from an iterable or properties from an object.
String Concatenation
Joining strings end to end with +.
String Index
A zero-based position used to locate a character in a String.
String Length
The number of UTF-16 code units in a String.
String Parsing
Strings cannot be directly converted to another data type, but strings can represent…
Ternary Operator
The ?: operator, which chooses one of two values from a condition.
The DOM
A browsers in-memory representation of the HTML document.
this
A value supplied by the way a regular function is called, often referring to the receiving object.
toString()
A method that returns a readable text representation of an object.
unshift()
An Array method that adds values to the beginning and returns the new length.
Vitest
A fast JavaScript test runner built on Vite.
while Loop
Keeps repeating as long as its condition stays true.

Journeyman

.catch()
A Promise method that schedules error handling for rejection.
.then()
A Promise method that schedules work for successful completion.
Array Iterator Method
An Array method that processes items through a callback, such as map, filter, or find.
async
A keyword added to functions that allows fetching data in parallel.
async Function
A function that always returns a Promise and allows await in its body.
await
An operator that pauses an async function until a value or Promise settles.
catch Block
A block that handles a matching exception from its try block.
Class
A blueprint for making objects that bundle data with actions.
Class Method
A function defined as a member of a JavaScript class.
Closure
An inner function that remembers the variables around it.
Constructor
The special class method that initializes a newly created JavaScript object.
Custom Error
An application-specific error class extending JavaScript's Error class.
Default Export
The single value a module marks as its default export.
defer
A Boolean classic-script attribute that delays execution until parsing finishes while preserving document order.
Dependency
External code that a project needs to compile or run.
Development Dependency
A package needed for development or testing but not for the application at runtime.
DOM
The browser's object representation of an HTML document.
Encapsulation
Keeping an object's data behind its methods so it's changed the safe way.
Error
An object describing a problem that interrupted normal execution.
ES Module
A JavaScript file using import and export to declare dependencies and public values.
Event
A member that lets an object notify subscribed code that something happened.
Event Listener
A callback registered to run when a particular event occurs.
every()
An Array method that reports whether every item passes a test.
extends
A keyword that makes one class inherit from another.
External script
A script loaded from a separate resource through a script element's src attribute.
Fetch API
A browser and runtime API for making HTTP requests that returns a Promise.
filter()
Keeps only the items that pass a test.
finally Block
A block that normally runs after try and catch whether an exception occurred or not.
find()
An Array method that returns the first item satisfying a test.
Getter
A method that returns an object's stored value.
Higher-Order Function
A function that takes or returns another function.
Inheritance
A new class starts with everything from another class, then adds or changes things.
Inline script
Script code written directly inside a script element.
Instance
One object made from a class, with its own data.
JSON.parse()
A method that converts valid JSON text into a JavaScript value.
JSON.stringify()
A method that converts a supported JavaScript value into JSON text.
Lexical Scope
The rule that a function can use names from where it was written.
map()
An Array method that creates a new array by transforming every item.
Method Overriding
A child class writing its own version of an inherited method.
Module script
A script processed as a JavaScript module with imports, strict mode, and module scoping.
Named Export
An exported value imported by its declared export name.
npm
The package registry and command-line client commonly used by JavaScript projects.
Package
A folder of related modules you can import from.
package.json
A project file containing package metadata, scripts, dependencies, and configuration.
Polymorphism
Different objects answering the same method call in their own way.
Private Field
A class field beginning with # that is accessible only inside its declaring class.
Promise
An object representing the eventual fulfillment or rejection of an asynchronous operation.
Promise State
A Promise's current state: pending, fulfilled, or rejected.
Pure Function
A function that produces the same result for the same inputs without changing outside state.
querySelector()
A DOM method that returns the first element matching a CSS selector.
Recursion
A function calling itself to solve a smaller piece of the same problem.
reduce()
A stream operation that combines elements into one result.
Response Object
An object returned by fetch containing an HTTP response's status, headers, and body methods.
Semantic Versioning
A major.minor.patch numbering convention communicating compatibility and change size.
Setter
A method that validates or changes an object's stored value.
some()
An Array method that reports whether at least one item passes a test.
sort()
Puts a list in order, changing the list itself.
Static Import
An import declaration resolved and loaded as part of a module's dependency graph.
Static Method
A class method called on the class itself rather than an instance.
super
A reference used to access a superclass constructor or member.
throw
A statement that deliberately raises an exception object.
try Block
A block containing code that may throw an exception.

Freelancer

<slot>
The element that marks where assigned light-DOM content appears inside a shadow tree.
<template>
The element that stores inert HTML fragments for later use.
AbortController
An object that sends cancellation signals to APIs such as fetch.
Async Iterator
An iterator whose next() method returns a Promise for each result.
Autonomous custom element
A custom element with its own hyphenated tag name.
Babel
A JavaScript compiler commonly used to transform newer syntax for older environments.
CommonJS
The Node.js module format based on require() and module.exports.
Currying
Transforming a function with several parameters into a sequence of one-parameter functions.
Custom element
An author-defined HTML element whose behavior is registered through the Custom Elements API.
Customized built-in element
A custom element that extends a built-in HTML element and uses the is attribute.
Cypress
A popular in-browser end-to-end testing tool.
Debounce
A technique that delays work until rapid calls have stopped for a chosen time.
Declarative shadow DOM
HTML syntax that creates a shadow root from a template element during parsing.
Deep Copy
A copy of a collection and everything inside it, fully separate.
Dynamic Import
The import() expression, which loads a module asynchronously when requested.
ESLint
A configurable tool that reports problems and style issues in JavaScript code.
Event Bubbling
The phase in which an event moves from its target up through ancestor elements.
Event Capturing
The phase in which an event travels from ancestors down toward its target.
Event Delegation
Handling events for many descendants with one listener on a shared ancestor.
Event Object
An object containing information about an event that occurred.
Event Target
The object on which an event was originally dispatched.
for await...of
A loop that awaits and visits values from an async iterable.
Generator Function
A function declared with function* that can pause and yield several values.
Immutability
The practice of creating new values instead of changing existing ones.
Iterable
Anything you can loop over with for.
Iterator
Gives out items one at a time with next() and remembers where it is.
Iterator Protocol
The next() method contract used to produce a sequence of values.
Local Storage
Browser key-value storage that remains after the page and browser are closed.
Map
A collection that associates unique keys with values.
Memoization
Caching a function's result so repeated inputs can return it without recalculation.
Mock Function
A test function that records calls and can return controlled values.
Module Bundler
A tool that combines a module graph into files prepared for deployment.
Named slot
A slot identified by name so matching host children can be assigned to it.
preventDefault()
An Event method that cancels the browser's default action when the event is cancelable.
Promise.all()
A method returning a Promise that fulfills when every input fulfills or rejects when one rejects.
Promise.allSettled()
A method returning results for every input after all have settled.
Promise.any()
A method returning the first fulfilled input or rejecting if all inputs reject.
Promise.race()
A method returning a Promise that settles when the first input settles.
Regular Expression
A pattern for finding or checking text.
Session Storage
Browser key-value storage kept for one tab's browsing session.
Set
A collection with no duplicates and no set order.
Shadow host
An element to which a shadow root is attached.
Shadow root
A document fragment that forms the root of a component's encapsulated shadow tree.
Shallow Copy
A new collection that still shares the items inside it with the original.
Slot assignment
The process that matches a shadow host's children with slots in its shadow tree.
Source Map
A file connecting transformed code locations back to the original source.
stopPropagation()
An Event method that stops the event from moving to other elements.
Strict Mode
A JavaScript mode that rejects some error-prone behavior and changes certain runtime rules.
structuredClone()
A function that makes a deep copy of many built-in JavaScript values.
Symbol
A primitive whose values are always unique and can be used as object property keys.
Throttle
A technique that limits how often repeated calls may run.
Transpiler
A tool that converts source code into another version of source code.
Tree Shaking
Removing exports that a build can determine are unused.
Unit Test
A small automated check of one focused unit of behavior.
WeakMap
A Map-like collection with weakly held object or non-registered Symbol keys.
WeakSet
A Set-like collection holding objects weakly so it does not prevent garbage collection.
Web Worker
A browser worker that runs JavaScript away from the page's main thread.
yield
Hands back one value from a generator and pauses until the next one is needed.

Master

Abstract Syntax Tree
A tree representation of source-code structure used by parsers and tools.
Accessor Property
An object property defined by getter and setter functions.
Call Stack
The stack of function calls currently being executed.
Comment node
A DOM node containing the text of an HTML comment.
Data Property
An object property that stores a value directly.
Document node
The DOM node representing the whole document and serving as the tree's root.
Element node
A DOM node representing an element and its attributes.
Enumerability
A property setting that controls whether common enumeration operations include that property.
Event Loop
The runtime mechanism that schedules queued work when the call stack is available.
Execution Context
The runtime state used to execute a script or function call.
FinalizationRegistry
An advanced API for requesting a callback after an object is garbage-collected.
Garbage Collection
Automatic recovery of heap memory from objects a program can no longer reach.
Hidden Class
An engine optimization that internally groups objects with the same property layout.
Hoisting
The effect of declarations being registered before execution reaches their source line.
Inherited Property
A property found through an object's prototype chain.
Inline Cache
An engine optimization that remembers prior property lookup or call results at a code location.
Just-in-Time Compilation
Runtime compilation of frequently executed JavaScript into optimized machine code.
Lexical Environment
An internal record connecting names in one scope to values and an outer environment.
Macrotask
An informal name for an event-loop task such as a timer or user event.
Memory Leak
Unwanted memory growth caused by retaining references to objects no longer needed.
Microtask Queue
A high-priority queue used by Promise reactions and queueMicrotask callbacks.
Node document order
The order nodes appear when a document tree is traversed from beginning to end.
Own Property
A property defined directly on an object rather than inherited.
Property Descriptor
A record controlling a property's value, accessors, writability, enumerability, and configurability.
Prototype
An object another object consults when a requested property is missing.
Prototype Chain
The linked sequence of prototypes searched during property lookup.
Proxy Object
An object that intercepts operations such as reading, writing, and property lookup for another object.
Realm
A JavaScript execution environment with its own global object and built-in objects.
Reflect API
Built-in methods that perform fundamental object operations and pair naturally with Proxy traps.
Run-to-Completion
The rule that one JavaScript job finishes before another job begins on the same agent.
Scope Chain
The sequence of lexical environments searched to resolve a name.
Task Queue
A queue of callbacks waiting to run as event-loop tasks.
Temporal Dead Zone
The period where a block-scoped variable exists but cannot be accessed before its declaration.
Text node
A DOM node that directly holds a string of characters.
Weak Reference
A reference to an object that does not prevent that object from being garbage-collected.

More subjects in Languages