← Back to JavaScript

JavaScript Glossary

Key terms from the JavaScript course, linked to the lesson that introduces each one.

2,557 terms.

#

`"auto"`
(default): Uses descriptive words when they exist and feel natural.
Lesson 1657Understanding Numeric vs Always OptionsLesson 2224Numeric vs Always Options
`==` (loose equality)
compares values *after attempting type conversion*
Lesson 54Equality vs Identity: == and ===Lesson 204Equality: == vs ===
`===` (strict equality)
compares both value *and* type without any conversion
Lesson 54Equality vs Identity: == and ===Lesson 204Equality: == vs ===
`buffer`
The underlying `ArrayBuffer` that holds the actual bytes
Lesson 2326Buffer, ByteOffset, and BYTES_PER_ELEMENTLesson 2336Creating a DataView
`byteLength`
The total number of bytes the array occupies in memory
Lesson 2325Length and ByteLength PropertiesLesson 2336Creating a DataView
`byteOffset`
How many bytes from the buffer's start your view begins
Lesson 2326Buffer, ByteOffset, and BYTES_PER_ELEMENTLesson 2336Creating a DataView
`context`
An object containing metadata about what's being decorated
Lesson 2070The Decorator Function SignatureLesson 2072Method Decorators
`fileName`
The file where the error occurred (Mozilla-specific)
Lesson 1148Error Object PropertiesLesson 2153Handling Errors in Workers
`findLast()`
returns the *value* of the last element that satisfies your test function:
Lesson 475FindLast and FindLastIndexLesson 881Using findLast() and findLastIndex()
`findLastIndex()`
returns the *index* of that last matching element:
Lesson 475FindLast and FindLastIndexLesson 881Using findLast() and findLastIndex()
`forEach`
executes code for each element but returns `undefined` (used only for side effects)
Lesson 444Map vs ForEachLesson 858When to Use forEach vs map
`map`
transforms data and returns a new array containing the results
Lesson 444Map vs ForEachLesson 858When to Use forEach vs map
`Object.values(obj)`
returns an array containing all the enumerable property *values*
Lesson 642Object.values() and Object.entries()Lesson 2017Iterating Non-Iterable Objects
`ok`
A boolean—`true` if status is in the 200-299 range
Lesson 2256The Response ObjectLesson 2274The Response Object Structure
`Promise.any`
resolves when the *first* promise fulfills, but only rejects if *all* promises reject.
Lesson 1320Performance Characteristics of CombinatorsLesson 1974Promise.any vs Promise.race
`Promise.race`
settles as soon as *any* promise settles (fulfilled or rejected).
Lesson 1320Performance Characteristics of CombinatorsLesson 1974Promise.any vs Promise.race
`type`
Describes the response type: `"basic"` (same-origin), `"cors"` (cross-origin with CORS), `"opaque"` (no-cors mode), or `"error"` (network failure).
Lesson 2274The Response Object StructureLesson 2367The File Interface

A

AAA (Arrange-Act-Assert)
and **Given-When-Then**.
Lesson 2669Test Organization Patterns: AAA and Given-When-Then
Accept
Tells the server what response formats you can handle.
Lesson 2262Setting Request HeadersLesson 2282Common HTTP Headers
Access device features
like geolocation or the camera
Lesson 17Browser Runtime: DOM and Web APIs
Accesses
the method on that temporary object
Lesson 43Primitive Wrapper Objects
Accessing built-in globals
without environment checks
Lesson 1461GlobalThis for Universal Code
Accidental breaking changes
A maintainer renames an "internal" function that users were actually importing
Lesson 2526Semver in Practice: Trust and Reality
Accumulating metrics or history
Lesson 1876Growing Arrays and Objects
Actions
are side effects that occur during a transition or while in a particular state.
Lesson 2426State and Transition VocabularyLesson 2429Adding Side Effects and Actions
adapter
that translates calls between the two interfaces—like a plug adapter that lets your US device work in a European outlet.
Lesson 1849The Adapter PatternLesson 1850When to Use Each Pattern
Add cross-cutting concerns
(logging, caching, access control) to many methods
Lesson 2067What Decorators Are and Why They Exist
Add domain context
– Include properties like `accountId` or `retryAfter` that matter to your business logic
Lesson 1151Why Custom Error Classes
Add iteration
– Run the trigger many times (100, 1000, 10000) to amplify the effect
Lesson 1894Reproducing Leaks Systematically
Add milk
→ takes hot coffee, produces latte
Lesson 477What is Function Composition?
Adding complexity
that makes code harder to read and maintain
Lesson 1901The Danger of Premature Optimization
Adding/removing values often
– Set operations are optimized
Lesson 1066Array vs Set: Handling Unique Values
Addition/Subtraction
`+`, `-`
Lesson 266Precedence Levels Overview
Additional formatters
For lists, relative time, pluralization, and more
Lesson 1643What Intl Solves: Beyond Naive Formatting
Advanced Error Recovery
Custom `throw()` implementations can handle errors and decide whether to continue iteration, resume from a checkpoint, or abort completely.
Lesson 1095When Custom Iterators Beat Generators
Advanced inference scenarios
like mapped types, recursive type manipulation, or inferring types from deeply nested structures hit JSDoc's parsing limits.
Lesson 2649Limitations: When TypeScript Becomes Necessary
After branch switches
Run `npm ci` to delete node_modules and reinstall exactly what the lockfile specifies—or run `npm install` if you want to update the lock to match package.
Lesson 2503When Lockfiles Get Out of Sync
Afterthought
(`i++`): Runs after each iteration.
Lesson 342The For Loop Structure
Airbnb
One of the most comprehensive style guides, covering ES6+, React, and accessibility.
Lesson 2558Extending Shared Configurations
All microtasks
run first, completely emptying the microtask queue
Lesson 1191Two Queues: Tasks and Microtasks
All-in-one tooling
Bundler, test runner, and package manager included
Lesson 19Deno and Bun: Alternative Runtimes
Allocation instrumentation on timeline
Records memory allocations over time as your app runs
Lesson 1884Opening DevTools Memory ProfilerLesson 1890Using Allocation Instrumentation on Timeline
Allocation sampling
A lighter-weight version that samples allocations periodically
Lesson 1884Opening DevTools Memory Profiler
Almost always use `===`
Loose equality's conversions create confusing bugs.
Lesson 54Equality vs Identity: == and ===
Altering behavior
If a function previously returned a number but now returns a string, downstream code may fail.
Lesson 2519MAJOR: Breaking Changes
Always call `callback()`
when done, or `callback(error)` if something fails
Lesson 1565Implementing the _transform Method
Always deferred
No need for `defer` attribute
Lesson 1408Type='module' in HTML
Always return the accumulator
so it carries forward to the next iteration
Lesson 864Building Objects with Reduce
Always runs
Executes whether the chain succeeded or failed
Lesson 1282The .finally() Method
Angular
Keeping RxJS subscriptions alive after `ngOnDestroy`, especially when subscribing directly without the `async` pipe.
Lesson 1881Memory Leak Patterns in Frameworks
Animation drops
Frame rates plummet below 60fps
Lesson 2191Main Thread Blocking and User Experience
Animation triggers
Start animations when elements become visible.
Lesson 1478IntersectionObserver
anonymous function
is simply a function without a name.
Lesson 382Anonymous FunctionsLesson 1228Anonymous vs Named Callbacks
Anonymous wrapper
(implicit binding):
Lesson 1229The 'this' Problem in Callbacks
Another function called inside
→ Push a new frame on top
Lesson 1181What is the Call Stack?
Another Pitfall
Accidentally using `+=` when you meant `=`:
Lesson 252Common Assignment Patterns and Pitfalls
Any key type
Use objects, functions, numbers—anything—as keys without conversion
Lesson 1065Object vs Map: When Objects Fall Short
Any name when importing
The importer chooses the name
Lesson 1411Default Export Syntax
Any type as keys
Use numbers, objects, functions, or even other Maps as keys without conversion
Lesson 1031What is a Map and Why Use It?
API calls on input
Send search requests every 300ms while typing, preventing request spam
Lesson 2387What Throttle Solves
API design
Are these function signatures intuitive for other developers?
Lesson 2603Automation vs. Human Judgment
API rate limits
Stay under requests-per-second caps
Lesson 1372Batching and Parallelism Limits
APIs and services
that let your code actually interact with the world.
Lesson 16What is a Runtime?
Apple-optimized
Built specifically to run efficiently on Apple hardware (iPhones, iPads, Macs)
Lesson 12JavaScriptCore: Safari's Engine
Arabic
has *six* plural forms depending on the number (0, 1, 2, 3-10, 11-99, 100+)
Lesson 2228Understanding Pluralization Across Languages
Architecture decisions
Whether a function should be split up or combined
Lesson 2603Automation vs. Human Judgment
Arrange/Given
Set up the preconditions and inputs
Lesson 2669Test Organization Patterns: AAA and Given-When-Then
Array handling
Check if both are arrays, compare lengths, then recurse on each element
Lesson 2406Recursive Deep Equality Algorithm
Array indices matter
→ `for` (traditional)
Lesson 361When to Use Each Loop Type
Array indices, loop counters
These always use Number
Lesson 1972When to Use BigInt vs Number
array of objects
, each representing one piece of the formatted output.
Lesson 2206formatToParts() for Custom RenderingLesson 2215FormatToParts for Granular Access
Array of paths
means "only these files have side effects; everything else is safe to tree shake.
Lesson 2469Side Effects and 'sideEffects' Field
Array-likes
are objects that have a `length` property and numbered indices (like `{0: 'a', 1: 'b', length: 2}`), but *don't* necessarily have `Symbol.
Lesson 1083Iterators vs Array-likes
Array.from()
is a method that takes the iterable as an argument:
Lesson 967Spread vs Array.from
Arrow
For concise inline callbacks (like in `.
Lesson 1331Async Function Syntax
Ask yourself
Does removing the label require significantly more complex code (flags, extra functions)?
Lesson 334When Labels Improve Readability vs Create ConfusionLesson 2606The Cost of Configuration
Assert/Then
Verify the outcome matches expectations
Lesson 2669Test Organization Patterns: AAA and Given-When-Then
Assertion placement
Where do you put your assertions?
Lesson 1251Testing Callback Hell Code
Asset integration
They handle CSS, images, and other resources
Lesson 2453What is a bundler and why do we need one?
assignment
or **other ternaries** without clear grouping:
Lesson 231Ternary Operator PrecedenceLesson 245Basic Assignment with =
Assignment operators
`=`, `+=`, `-=`, etc.
Lesson 266Precedence Levels Overview
Associativity
is the rule that determines whether operators group from left-to-right or right-to-left when they share the same precedence level.
Lesson 271Associativity: Left-to-Right vs Right-to-Left
Async + callback-based
error-first callbacks
Lesson 1169Choosing the Right Error Strategy
Async + modern
use promises/async-await with try/catch
Lesson 1169Choosing the Right Error Strategy
Async callbacks
execute later, after the current code finishes:
Lesson 1231Callback Pattern Summary
async generator
is a special function that combines two powerful features you already know:
Lesson 2038What Are Async Generators?Lesson 2039Async Generator Syntax
Async generators
returned by built-in functions (though these are technically user-created)
Lesson 2027Built-in Async IterablesLesson 2048Async Generators vs Promise Arrays
async iterator
an object with a `next()` method that returns a *promise* which resolves to `{value, done}`.
Lesson 2019What Symbol.asyncIterator RepresentsLesson 2039Async Generator Syntax
Async loading
Supports modern loading patterns
Lesson 1449When to Use CommonJS in Modern Projects
Async/await
hides the Promise machinery, making code look synchronous.
Lesson 1338Async Functions vs Promise ChainsLesson 2038What Are Async Generators?
Asynchronous callbacks
are different: they're stored by the JavaScript environment and invoked *later*, after some event occurs (like a timer finishing or data arriving).
Lesson 1224Asynchronous CallbacksLesson 1225Callback Execution Context
Asynchronous coordination
Operations like `setTimeout`, event listeners, and file reading use callbacks to handle results that arrive later
Lesson 1231Callback Pattern Summary
Asynchronous with callbacks (async)
Uses callback functions, allowing code to continue executing
Lesson 1517FS Module Overview: Sync vs Async vs Promises API
At least one string
Convert everything to text and glue together.
Lesson 275String Coercion with the + Operator
Atom
Install the "prettier-atom" package
Lesson 2586Prettier Editor Extensions
Audio/video processing
Multiple workers processing different chunks of the same audio buffer in real-time
Lesson 2189When SharedArrayBuffer Makes Sense
Audit accuracy
`npm audit` checks precise versions, not vague ranges
Lesson 2507Audit and Security in Dependencies
Authorization
Sends credentials or tokens to prove your identity to the server.
Lesson 2262Setting Request HeadersLesson 2282Common HTTP Headers
Auto-save
Save draft only after typing pauses
Lesson 2390Debounce vs Throttle: When to Use Which
Autocomplete
Type a variable followed by a dot, and see all available properties
Lesson 2648Editor Experience with JSDoc
Automatic Help
Yargs generates `--help` text from your configuration, so users can discover what your tool does without reading external docs.
Lesson 1514Advanced Parsing with yargs
Automatic Promise wrapping
Whatever you return gets wrapped in a resolved Promise.
Lesson 1330What Makes a Function Async
Automatic propagation
When new data arrives, all dependent computations and effects update automatically
Lesson 2142Real-Time Data and Live Updates
Automatically destroys
all streams if one fails
Lesson 1581Pipeline for Better Error Handling
Avoid for arrays
it iterates keys as strings, not predictable order
Lesson 361When to Use Each Loop Type
Avoid it
in request handlers or repeated operations—blocking code during runtime freezes your entire server!
Lesson 1519Reading Files Synchronously with fs.readFileSync()
Avoid multiple passes
over the same data
Lesson 871Reduce Performance Considerations
Avoid the `delete` operator
Deleting properties forces shape transitions that de-optimize code.
Lesson 1917Practical Takeaways for Hidden Classes
Avoid user-controlled patterns
never pass raw user input to `new RegExp()`
Lesson 1740ReDoS and Security
Avoiding deep inheritance chains
– Inheritance couples tightly; mixins compose loosely
Lesson 1813When to Choose Mixins
Avoiding unintended mutations
in complex nested data
Lesson 2395Why Deep Clone?
Await eligibility
Only inside an `async` function can you use the `await` keyword (which you'll learn about next).
Lesson 1330What Makes a Function Async

B

Babel
to convert logical assignment operators into equivalent ES5 code.
Lesson 1963Browser and Node Support Considerations
Backtracking with optional groups
can also cause issues:
Lesson 1688Common Quantifier Pitfalls
Balance is key
In real codebases:
Lesson 1795Point-Free in Real Codebases
Base cases first
If both values are primitives or identical references, compare with `===`
Lesson 2406Recursive Deep Equality Algorithm
Base64 encoding
converts binary data into a text string using only 64 safe, printable ASCII characters: `A-Z`, `a-z`, `0-9`, `+`, and `/` (plus `=` for padding).
Lesson 2353What is Base64 and Why It Exists
Base64url
(also called "URL-safe Base64") solves this by making two simple substitutions:
Lesson 2361URL-Safe Base64 Variants
Basic Multilingual Plane (BMP)
is Unicode's first 65,536 characters (code points U+0000 to U+FFFF).
Lesson 185Surrogate Pairs and the BMP
Batch processing
where you want to know which items succeeded and which failed
Lesson 1317allSettled for Independent Operations
batching
all promise resolutions that happen during the current synchronous execution get processed together, in order, before any other async work.
Lesson 1202Why Microtasks ExistLesson 2123Batching and Glitch-Free Updates
Batching updates
Collect multiple state changes, then apply them all at once
Lesson 519Callback Queues
BE
little-endian vs big-endian byte order
Lesson 1585Reading from Buffers
Be specific
Use full URLs (`https://example.
Lesson 2178Security: Validating Message Origins
Before decorators
, you had to manually bind methods in the constructor (`this.
Lesson 2097Binding 'this' Automatically
Behaviors
unique to each object (a car's `drive()` method uses *that car's* speed)
Lesson 789Static vs Instance: When to Use Each
Best practice
Explicit function calls are more maintainable
Lesson 719Why __proto__ Is Deprecated in Modern Code
better error messages
and **self-referencing capability**.
Lesson 434Named vs Anonymous CallbacksLesson 2681Custom Matchers
Better performance
Maps are optimized for frequent additions and deletions
Lesson 1031What is a Map and Why Use It?Lesson 2451Environment Variables and Build-Time Constants
Better stack traces
When an error occurs, the function's name appears in error messages instead of "anonymous function," making debugging much easier.
Lesson 383Named Function Expressions
Between different task sources
, priority may vary by browser implementation.
Lesson 1199Task Queue Priority and Order
Between two word characters
(inside a word): `a|p|ple` (the pipes show `\B` positions)
Lesson 1693Non-Word Boundaries: \B
Big-endian
Most significant byte first (like reading left-to-right in English)
Lesson 2329Byte Order and EndiannessLesson 2339Endianness in DataView
binary
(base 2), and many decimal numbers that look simple to us cannot be represented exactly in binary.
Lesson 115Floating-Point Representation BasicsLesson 1965Numeric Separators in Different Bases
Binary I/O Optimization
When reading from or writing to files, network streams, or WebGL buffers, typed arrays map directly to the underlying binary representation.
Lesson 2330Performance Characteristics
Binary transfer is supported
Modern APIs (Fetch with ArrayBuffer, file uploads with FormData, WebSocket binary frames) handle raw binary efficiently
Lesson 2360Base64 Overhead and When to Avoid It
Binds
`this` inside `MyConstructor` to that new object
Lesson 552The 'new' Keyword and Constructor Calls
Bitwise operators
are special operators that work at the lowest level of how computers store numbers: as sequences of 1s and 0s (binary).
Lesson 253What Are Bitwise Operators?
Bitwise XOR operator (`^`)
compares two numbers bit-by-bit and returns a result where each bit is `1` if the corresponding bits in the two operands are *different*, and `0` if they're the *same*.
Lesson 257Bitwise XOR (^)
block
is any section of code wrapped in curly braces.
Lesson 80Block Scope BasicsLesson 81Blocks vs Functions
block-scoped
meaning it only exists within the curly braces `{}` where it's defined.
Lesson 67Declaring Variables with letLesson 80Block Scope Basics
blocking
behavior because each operation blocks (prevents) the next one from starting until it finishes.
Lesson 1170What 'Synchronous' Means in JavaScriptLesson 1519Reading Files Synchronously with fs.readFileSync()
Blocking behavior
`require()` freezes your program until loading completes.
Lesson 1429Dynamic Import vs require()
Blocks
are like rooms in a building — `let` and `const` can't leave the room they're declared in
Lesson 81Blocks vs Functions
Body methods
like `json()`, `text()`, `blob()` to extract the actual data
Lesson 2256The Response Object
Boolean flags
like `--verbose` become `true` automatically
Lesson 1513Argument Parsing Libraries: minimist
Borrowing methods
You want to use one object's method on a different object temporarily
Lesson 557Why Manual 'this' Binding Exists
Both parameters are optional
, but they give you fine-grained control over formatting.
Lesson 2199Creating a NumberFormat Instance
Bracket access later
Use when you need to read/write properties *after* the object exists
Lesson 624When to Use Computed vs Dot/Bracket Access
Branch Coverage
measures whether your tests take both paths through conditional statements.
Lesson 2716What Code Coverage MeasuresLesson 2718Reading Coverage ReportsLesson 2719Branch Coverage vs Line Coverage
Breakpoints work
as if you were running unbundled code
Lesson 2480Using Source Maps in Browser DevTools
Breaks assumptions
You think variables are independent when they're not
Lesson 52Pitfall: Unintended Shared State
Brew coffee
→ takes ground coffee, produces hot coffee
Lesson 477What is Function Composition?
Browser APIs are sufficient
The built-in `Intl` APIs (`NumberFormat`, `DateTimeFormat`, `RelativeTimeFormat`, `ListFormat`, etc.
Lesson 2247Identifying Simple i18n Requirements
Browser caching
External files can be cached, making your site faster for returning visitors
Lesson 23External JavaScript Files
Browser rendering
stops—the screen won't update
Lesson 1217Blocking the Event Loop
browser runtime
is the complete environment where your code runs, and it includes the engine *plus* a collection of powerful tools called **Web APIs**.
Lesson 17Browser Runtime: DOM and Web APIsLesson 18Node.js Runtime: Server-Side JavaScriptLesson 20Why Runtime Differences Matter
Buffering begins
Incoming chunks pile up in an internal buffer
Lesson 1576How Backpressure Works Internally
Bug fixes
that correct broken behavior
Lesson 2521PATCH: Bug Fixes and Safe Updates
Build artifacts
`dist/`, `build/`, `out/` contain compiled code that will be regenerated anyway
Lesson 2579Ignoring Files with .prettierignore
Build directories
like `dist/`, `build/`, or `out/`
Lesson 2562The .eslintignore File
Build slowdowns
More rules mean longer lint times in CI/CD pipelines
Lesson 2606The Cost of Configuration
Building assets
`"build": "node build.
Lesson 2511The Scripts Field in Package.json
Building data structures
Implementing stacks or queues often uses `push()` and `shift()` for efficiency.
Lesson 837When to Prefer Non-Mutating Methods
Building domain-specific data structures
that should behave naturally with language features (custom collections, special numeric types)
Lesson 1022When to Use Well-Known Symbols
Building pipelines
Chain multiple transformations (`map`, `filter`) without creating intermediate arrays
Lesson 1127When to Choose Lazy vs. Eager
Building predictable functions
Functions that don't mutate their inputs are easier to test, reason about, and reuse.
Lesson 837When to Prefer Non-Mutating Methods
Built-in assertions
Jest includes `expect()` with dozens of matchers (`toBe()`, `toEqual()`, `toContain()`, etc.
Lesson 2655Jest: The All-in-One Runner
Built-in size tracking
Maps have a `.
Lesson 1031What is a Map and Why Use It?
Built-in types
`Date`, `RegExp`, `Map`, `Set`, `ArrayBuffer`, `TypedArray`, `DataView`, `Blob`, `File`
Lesson 2004What structuredClone Can and Cannot Clone
Bun
are newer runtimes built to address some of Node.
Lesson 19Deno and Bun: Alternative Runtimes
Bun runtime
has its own fast APIs
Lesson 20Why Runtime Differences Matter
Bundle Analysis Tools
let you inspect the final output.
Lesson 2473Verifying Tree Shaking Results
Bundle Node's `EventEmitter`
via a package like `eventemitter3` or `events` polyfill
Lesson 2423Node.js EventEmitter vs Custom Implementations
Bundle Size Budgets
"Total JavaScript must be under 200KB gzipped"
Lesson 1932Setting Performance Budgets
Business logic correctness
Does this discount calculation match requirements?
Lesson 2603Automation vs. Human Judgment
byte offset
(where to start) and a **length** (how many elements to include).
Lesson 2323Creating Typed Arrays from ArrayBufferLesson 2338Writing with DataView Set Methods

C

Cache-Control
When freshness matters (or when debugging cache issues)
Lesson 2282Common HTTP Headers
Cacheable
Store results because they never change
Lesson 1742Deterministic Output: Same Inputs, Same Results
Cached data
Fall back to stored information
Lesson 1281Recovering from Errors with .catch()
Caching DOM element metadata
WeakMap (allows GC)
Lesson 1072Decision Framework: Choosing the Right Collection
Caching metadata
about DOM elements that might be removed from the page
Lesson 1062Memory Management Benefits
Calculating distance or difference
Lesson 137Math.abs for Absolute Values
call
it as many times as needed by writing its name followed by `()`.
Lesson 379Function Declaration SyntaxLesson 380Calling Functions and Return Values
Call count matchers
Verify exactly how many times a mock was invoked:
Lesson 2704Assertion Matchers for Mocks
call site
(where you actually invoke the method) determines the context, not where the method was defined.
Lesson 649How 'this' Works in Method CallsLesson 1910Monomorphic vs Polymorphic SitesLesson 1914When V8 Inlines Functions
call stack
is JavaScript's internal to-do list for functions.
Lesson 1181What is the Call Stack?Lesson 1213The Event Loop Flow Diagram
callback
is simply a function that you pass as an argument to another function, with the expectation that it will be invoked (called back) at some point in the future.
Lesson 1221What is a Callback?Lesson 1231Callback Pattern SummaryLesson 1520Writing Files with fs.writeFile()Lesson 1555Creating a Writable Stream
Callback Hell
(also called the "Pyramid of Doom") occurs when you nest multiple asynchronous callbacks inside each other.
Lesson 1242What is Callback Hell?
Callback-based async
is like giving them your number and continuing your day—they'll call when ready.
Lesson 1517FS Module Overview: Sync vs Async vs Promises API
Callbacks
You pass a method to `setTimeout`, `addEventListener`, or an array method, and `this` becomes undefined or global
Lesson 557Why Manual 'this' Binding ExistsLesson 2424Event Emitter Use Cases and Alternatives
Calls the `Symbol.iterator` method
on the collection to get an iterator
Lesson 1077Consuming Iterators with for...of
Cannot use reserved keywords
words like `let`, `const`, `var`, `if`, `function`, etc.
Lesson 69Variable Naming Rules
Canvas API
provides a drawable surface for creating graphics, animations, games, and data visualizations programmatically using JavaScript.
Lesson 1494Web APIs Beyond the DOM
Capital letter convention
Classes typically start with a capital letter (like `Person`, not `person`)
Lesson 745Declaring a Class with the class Keyword
Cardinal plurals
count quantities: "1 apple," "2 apples," "5 apples"
Lesson 1661Ordinal vs Cardinal PluralsLesson 2231Cardinal vs Ordinal Plurals
caret
(`^`) for most dependencies—you want security patches and new features.
Lesson 2523Version Ranges in package.jsonLesson 2524Caret (^) vs Tilde (~) Ranges
Catch block
Handles the error if one is thrown.
Lesson 2435The Traditional Throw/Try-Catch Pattern
Chai
for BDD-style assertions (`expect(value).
Lesson 2657Mocha: The Flexible Runner
Chaining (concatenation)
iterate through the first iterable completely, then the second, then the third, etc.
Lesson 1094Combining Multiple Iterators
Change severity
from `"error"` to `"warn"` (or vice versa)
Lesson 2569Overriding Rules in Extended Configs
Changing function signatures
Removing parameters, reordering them, or changing return types can break existing usage.
Lesson 2519MAJOR: Breaking Changes
Cheap functions
where lookup overhead exceeds computation time
Lesson 2378When Memoization Helps Performance
Check consistency
Does it happen for all users, or just some configurations?
Lesson 1930Identifying Real Performance Problems
Check its prototype
if not found, look there
Lesson 698The Prototype Chain Concept
Check the condition
Before anything happens (even the first time), JavaScript evaluates the condition expression
Lesson 338While Loop Execution Flow
Check the object itself
does it have the property?
Lesson 698The Prototype Chain Concept
Check the prototype's prototype
keep going up
Lesson 698The Prototype Chain Concept
Check the retainer path
to see what JavaScript variable is holding the reference
Lesson 1891Identifying Detached DOM Nodes
Check the return value
of every `write()` call
Lesson 1580Manual Backpressure Management
Checks each node
of that tree against configured rules
Lesson 2602What Linters Actually Do
CJS
creates a copy of exported values, while **ESM** creates a live binding—changes in the original module reflect in imports.
Lesson 1540CommonJS require() vs ES Module import
Clarity
The double underscores suggest it's internal/private
Lesson 719Why __proto__ Is Deprecated in Modern Code
Clarity trumps brevity
If you hesitate even slightly, add parentheses
Lesson 273When to Rely on Precedence vs Parentheses
Class declarations
are named and exist in their entire scope, but unlike function declarations, they're **not hoisted** — you can't use them before the line they're declared.
Lesson 756When to Use Class Declarations vs Expressions
Class expressions
(named or anonymous) are typically assigned to variables or used immediately, giving you more control over scope and timing.
Lesson 756When to Use Class Declarations vs Expressions
Class filter
or **Constructor** column.
Lesson 1888Filtering by Constructor Name
Class syntax
provides cleaner, more organized code:
Lesson 743When to Use 'new' vs Class Syntax
Classes are NOT hoisted
like function declarations:
Lesson 745Declaring a Class with the class Keyword
Clean structure
No prototype chain interference
Lesson 1065Object vs Map: When Objects Fall Short
Clean up
(close the modal, clear data, etc.
Lesson 1887Comparing Two Snapshots
Cleaner code
No need to track indexes or use bracket notation
Lesson 352For...of with Strings
Cleaner readability
– easier to scan object definitions
Lesson 648Methods vs Function Properties
Cleanup tasks
`"clean": "node scripts/clean.
Lesson 2511The Scripts Field in Package.json
Clear communication
Signals which properties are stable public API vs implementation details
Lesson 1829Convention-Based Privacy with Underscore Prefix
Clearer intent
The code shows you're extracting specific values
Lesson 915What is Array Destructuring?
Clears marks
from surviving objects, preparing for the next garbage collection cycle
Lesson 1864The Sweep Phase
Click "Take snapshot"
the page freezes briefly while DevTools records everything
Lesson 1885Taking a Heap Snapshot
Cloning complex configuration objects
that will be modified in different contexts
Lesson 2007When to Use structuredClone
Close callbacks
(socket closures, etc.
Lesson 1218Event Loop in Node vs Browser
Closure objects
listed with `(closure)` labels
Lesson 533Debugging Closure Memory Issues
Closures holding circular structures
Lesson 1877Circular References in Modern Engines
code points
as the actual characters in Unicode's master list.
Lesson 184Code Points vs Code UnitsLesson 190Iterating Strings with For...of
Code style
Indentation, quote styles, spacing
Lesson 2603Automation vs. Human Judgment
code units
as the storage boxes JavaScript uses to hold these characters.
Lesson 184Code Points vs Code UnitsLesson 186String Length and Surrogate Pairs
Cognitive load decreases
No surprises when switching files
Lesson 2604Consistent Style vs. Personal Preference
Colons `:` separate
keys from their values
Lesson 589What is an Object Literal?
Combine transformation and accumulation
in one step
Lesson 871Reduce Performance Considerations
Combine with `take()`
If you've built a lazy `take()` helper, it produces a finite iterator that `for-of` can exhaust naturally.
Lesson 2057Lazy Iterators and For-Of
Comes back
to your function when the microtask runs
Lesson 1351The Implicit Microtask Queue
Comma operator
`,` — Evaluates multiple expressions, returns the last
Lesson 266Precedence Levels Overview
Command-line arguments
what was typed when your program started
Lesson 1496What is the Process Object?
Command/Decorator/Proxy
These are for specialized cases—undo/redo systems (Command), adding behavior without modifying classes (Decorator), or controlling access/adding logging (Proxy).
Lesson 1850When to Use Each Pattern
Commands
Structure your CLI with subcommands like `myapp deploy` or `myapp status`, each with their own options.
Lesson 1514Advanced Parsing with yargs
Commas `,` separate
each key-value pair
Lesson 589What is an Object Literal?
Common pitfalls
Unreachable code, unused variables
Lesson 2603Automation vs. Human Judgment
Common use case
Wrapping numbers around a limit (like cycling through array indices or creating repeating patterns).
Lesson 248Remainder and Exponentiation AssignmentLesson 1600Math.sqrt and Math.cbrt
CommonJS (CJS)
the original system using `require()` and `module.
Lesson 1540CommonJS require() vs ES Module import
CommonJS exports are copies
when you require a module, you get a snapshot of its exported values at that moment.
Lesson 1450CJS and ESM: Two Module Systems
CommonJS loads synchronously
when you call `require()`, Node.
Lesson 1450CJS and ESM: Two Module Systems
Communication
they send messages back and forth (like two programs talking via a messenger)
Lesson 2147What Are Web Workers?
Compact notation
is perfect for dashboards and social media (showing "2.
Lesson 2205Grouping and Notation Options
comparator function
is a callback you pass to `sort()` that tells it how to compare two elements.
Lesson 819sort() with Comparator FunctionsLesson 898Writing a Numeric Comparator
Compare against baselines
Is 200ms slow for this task?
Lesson 1930Identifying Real Performance Problems
Compare counts
between snapshots—if `User` objects grow from 50 to 5,000, you've found your leak
Lesson 1888Filtering by Constructor Name
Comparison
view to see what objects were added between snapshots.
Lesson 533Debugging Closure Memory Issues
Comparison operators
`<`, `>`, `<=`, `>=`
Lesson 266Precedence Levels Overview
Competitive benchmarks
(what similar sites achieve)
Lesson 1932Setting Performance Budgets
Compilation
means translating *all* the code into machine language *before* running it.
Lesson 14Interpretation vs Compilation
Complex async coordination
Scenarios like "wait for three API calls, retry failures, timeout after 5 seconds" become simple operator chains instead of tangled promise logic.
Lesson 2139Identifying Problems Suited for Reactive Patterns
Complex calendar operations
(business days, recurring events)
Lesson 1653When to Use Intl vs Third-Party Libraries
Complex conditional logic
– When you find yourself with nested `if` statements checking flags like `isLoading && !
Lesson 2432When to Use FSMs in JavaScript
Complex conditions
When your condition involves multiple logical operators, wrapping it in a ternary makes it dense:
Lesson 233Ternary Pitfalls and ReadabilityLesson 370Loop control best practices and readability
Complex data structures
Objects, nested arrays, and most JavaScript types work seamlessly
Lesson 2179PostMessage vs Shared Memory: When to Use Each
Complex dependency graphs
Multiple derived values depend on each other
Lesson 2143Derived State and Automatic Recalculation
Complex Early Termination
If you need sophisticated cleanup that depends on *how* iteration stopped (break, exception, explicit call to `return()`), custom `return()` methods give you that control.
Lesson 1095When Custom Iterators Beat Generators
Complex generics
with multiple type parameters and constraints quickly become unwieldy.
Lesson 2649Limitations: When TypeScript Becomes Necessary
Complex validation logic
that obscures test intent
Lesson 2681Custom Matchers
Composition
means creating functionality by combining simple, focused objects or functions together, rather than forcing objects to inherit behavior from parent classes.
Lesson 1817What Composition MeansLesson 1821Functional MixinsLesson 1853The Yo-Yo Problem: Navigating Complex HierarchiesLesson 2142Real-Time Data and Live UpdatesLesson 2539Scripts: Automating Tasks
Compression/decompression
(gzip)
Lesson 1564Transform Streams Explained
Computation savings
Work stops the moment you have what you need
Lesson 2061Lazy Evaluation Performance Benefits
Compute a single value
from an array (sum, product, single object)
Lesson 871Reduce Performance Considerations
Computed caching
Optimize expensive getter calculations by caching results.
Lesson 2080Accessor Decorators (Getters and Setters)
Computed keys at creation
Use when you know the dynamic key name *while building* the object
Lesson 624When to Use Computed vs Dot/Bracket Access
Computed property names
let you wrap an expression in square brackets `[]` *inside the object literal*, and JavaScript will evaluate that expression to determine the property key.
Lesson 616Computed Property Names with []Lesson 624When to Use Computed vs Dot/Bracket Access
Conceptual example
(syntax only for illustration):
Lesson 1762Immutability Helpers and Libraries
Concise
No extra ceremony or function calls needed
Lesson 799Creating Arrays with Array Literals
Conditional types
where one type determines another based on runtime-like logic (`T extends U ?
Lesson 2649Limitations: When TypeScript Becomes Necessary
Conditionals
Make decisions based on how many entries exist
Lesson 1038Map Size Property
Configuration objects, simple data
→ Shallow often enough
Lesson 696Choosing the Right Clone Strategy
Configure format-on-save
in your editor's settings
Lesson 2586Prettier Editor Extensions
Consider single reduce
when profiling reveals a bottleneck with very large arrays (tens of thousands+ of elements) or when you're already using reduce for accumulation logic.
Lesson 461Chaining Operations vs Single Reduce
Consistency guarantees
All derived values must update atomically
Lesson 2143Derived State and Automatic Recalculation
Consistent syntax
Uses the same `.
Lesson 962Concatenating Arrays with Spread
Console closed
Logged objects *can* be garbage collected
Lesson 1878Console.log in Production Code
Console open
Logged objects are retained indefinitely
Lesson 1878Console.log in Production Code
Constraints
Enforce policy across dependencies
Lesson 2528Yarn Classic vs Yarn Berry (v2+)
Content-Type
Tells the server what format your request body is in (like `application/json` when sending JSON data).
Lesson 2262Setting Request HeadersLesson 2282Common HTTP Headers
Continuous data streams
Real-time dashboards, live search, auto-save features, and animations benefit from observable streams that handle throttling, debouncing, and cancellation elegantly.
Lesson 2139Identifying Problems Suited for Reactive Patterns
Control
You need specific behavior the library doesn't offer
Lesson 2413When to Use Libraries vs Rolling Your Own
Control access
(read-only properties via getter without setter)
Lesson 667When to Use Getters/Setters vs Plain Properties
Controlled access
Prevent direct modification of internal properties
Lesson 660Defining Setters with the 'set' Keyword
Controlled interfaces
Only exposing specific methods/getters/setters
Lesson 1827What Encapsulation Means in JavaScript
Controlled updates
You can review security patches before they're applied
Lesson 2507Audit and Security in Dependencies
Convenient
You can add optional features later without breaking existing calls
Lesson 406Too Many Arguments: Extra Values
Convention
Every style guide and experienced developer uses literals.
Lesson 599Object Literals vs. new Object()Lesson 1827What Encapsulation Means in JavaScript
Coordinated Releases
If your packages always release together or follow lockstep versioning (like a design system with components, themes, and utilities), a monorepo simplifies the release process.
Lesson 2552When a Monorepo Makes Sense
Copy-paste errors
Similar-looking code invites mistakes
Lesson 1244Error Handling Complexity
CORS applies
Module files must be served from the same origin (or with proper CORS headers)
Lesson 1408Type='module' in HTML
Could change
without breaking external code
Lesson 1987Private Methods
Counters
tracking class-level information (e.
Lesson 789Static vs Instance: When to Use Each
Coverage reports
from testing tools
Lesson 2562The .eslintignore File
CPU Cache Efficiency
Contiguous memory means better CPU cache utilization.
Lesson 2330Performance Characteristics
CPU-bound tasks
keep the processor busy *computing*.
Lesson 2190CPU-Bound vs I/O-Bound Tasks
Create a trigger function
– Wrap the leaky behavior in a function you can call repeatedly
Lesson 1894Reproducing Leaks Systematically
Creates tight coupling
where children can't exist without their entire ancestry
Lesson 1852Inheritance Hierarchies That Are Too Deep
Creating a view
over an underlying binary buffer
Lesson 2319What Are Typed Arrays?
Creating test fixtures
where each test needs pristine, unshared data
Lesson 2007When to Use structuredClone
Critical caveat
If the BigInt is larger than `Number.
Lesson 132BigInt Type Checking and Conversion
Critical detail
You must wrap the function call in an arrow function.
Lesson 2679Exception Assertions
Critical invariants
Internal state that, if modified externally, would break your object's integrity
Lesson 1991When to Use Private Fields
Critical point
Setters mutate the original object.
Lesson 1625Setting Date Components with Setters
Cross-project consistency
Your team runs `npm test` whether you're using Jest, Mocha, or any other tool—the implementation is hidden behind the interface.
Lesson 2539Scripts: Automating Tasks
Crucially
The position in the string doesn't advance—you're still at the same spot
Lesson 1712Positive Lookahead Syntax (?=...)
Cryptography
Keys and hashes exceeding 53 bits
Lesson 1972When to Use BigInt vs Number
CSS
May be injected into the page via a `<style>` tag at runtime, extracted into a separate `.
Lesson 2448Asset Pipeline IntegrationLesson 2583Prettier for More Than JavaScript
CSS styling
deeply—the three form an inseparable trio.
Lesson 1495Where to Learn More About Web Development
Current value
– the array element being processed right now
Lesson 860Understanding Reduce: The Swiss Army Knife of Array Methods
Currently executing functions
– Variables on the call stack
Lesson 1862Roots and Reference Chains
Currying
is a functional programming technique that converts a function taking multiple arguments into a sequence of functions, each taking a single argument.
Lesson 1764What Is Currying?Lesson 1768Currying vs Partial Application
Custom parsing
Process data incrementally before it's fully downloaded
Lesson 2291Accessing the ReadableStream
Custom properties
Any additional data attached by the code that created the error
Lesson 1356Extracting Error Information

D

Dangerous
Typos or misunderstandings won't produce errors, making bugs harder to spot
Lesson 406Too Many Arguments: Extra Values
Dangling callbacks
With callback-based APIs using the `done()` pattern, forgetting to call `done()` or calling it too early can skip assertions.
Lesson 2692Avoiding False Positives with Assertions
Data
The content to write (string or Buffer)
Lesson 1520Writing Files with fs.writeFile()
Data collection
Appending records as they arrive
Lesson 1521Appending to Files with fs.appendFile()
Data conversion
(CSV to JSON, text encoding)
Lesson 1564Transform Streams Explained
Data dependency exists
Operation B needs the result from Operation A
Lesson 1368Choosing Between Sequential and Parallel
Data is small
The overhead of generators outweighs memory savings
Lesson 1127When to Choose Lazy vs. Eager
Data processing
iterating over massive arrays
Lesson 1903When Micro-Optimizations Do Matter
Database IDs
64-bit integers from databases
Lesson 1972When to Use BigInt vs Number
Database queries
Retrieving data isn't instantaneous
Lesson 1174Why JavaScript Needs Asynchronous Code
DataView
objects (which you've already learned about) to actually interpret and manipulate the binary data stored inside.
Lesson 2333Creating ArrayBuffers
Date arithmetic
(adding days, calculating differences)
Lesson 1653When to Use Intl vs Third-Party Libraries
DateTimeFormat
Formats dates according to local conventions (month/day order, separator styles, weekday names)
Lesson 1643What Intl Solves: Beyond Naive Formatting
Daylight Saving Time (DST)
Many regions shift their clocks forward in spring and back in autumn.
Lesson 1640Timezone Offset Changes Over Time
Days
Divide milliseconds by `86,400,000` (24 × 60 × 60 × 1000)
Lesson 1629Converting Milliseconds to Human-Readable Durations
Dead Contexts
Sending to a terminated worker or closed window fails silently or throws depending on timing:
Lesson 2177Error Handling in Cross-Context Messaging
Debuggable
Same inputs always trigger the same code path
Lesson 1742Deterministic Output: Same Inputs, Same Results
Debugging Made Easier
If bugs occur, you can trace through your data history like breadcrumbs.
Lesson 906Why Immutability Matters in JavaScript
Debugging needs
Want visibility in devtools or during testing
Lesson 1991When to Use Private Fields
Decimal (no prefix)
The standard way you're used to:
Lesson 101Number Literals: Decimal, Hex, Octal, Binary
Declaration
When you need hoisting or clear top-level functions
Lesson 1331Async Function Syntax
Declarations are registered
in their scope (global or function)
Lesson 90What is Hoisting?
Declarative cleanup
Unsubscribing automatically tears down connections and clears listeners
Lesson 2142Real-Time Data and Live Updates
Decorators
are a way to **augment** (modify or enhance) classes, methods, properties, and other class members by attaching metadata or wrapping them with additional behavior—**without editing their original code**.
Lesson 2067What Decorators Are and Why They Exist
Decouple
the requester from the executor
Lesson 1846The Command Pattern
Decoupling
is the core benefit.
Lesson 2414The Event Emitter Pattern
Deduplication
means npm identifies when multiple packages require compatible versions of the same dependency.
Lesson 2505Dependency Hoisting and Deduplication
Deep dependency chains
A changes B, B changes C, C changes D
Lesson 2143Derived State and Automatic Recalculation
Deep equality
compares the *contents* of objects recursively, not just their references.
Lesson 2405Why Deep Equality Is NeededLesson 2673Basic Equality Assertions
Deep nesting
where shallow copies cascade
Lesson 1763Performance Considerations with Immutability
Default behavior
If you omit the second parameter, DataView uses **big-endian** (network byte order).
Lesson 2339Endianness in DataView
Default Binding
What happens when none of the other rules apply (the fallback case)
Lesson 538The Four Binding Rules Preview
Default to chaining
for readability.
Lesson 461Chaining Operations vs Single Reduce
Default to readable code
Unless you're in a hot path *and* you've measured a problem, write for the next developer first.
Lesson 1936Building a Performance Culture Without Obsession
Default values
Return a sensible default when data can't be loaded
Lesson 1281Recovering from Errors with .catch()Lesson 1514Advanced Parsing with yargs
Default values or normalization
Automatically clean or format data as objects are created, keeping your constructor logic clean and declarative.
Lesson 2073Field Decorators
Defined transitions
Clear rules for moving between states
Lesson 2425What Is a Finite-State Machine?
Defining object methods
– When you *want* `this` to refer to the object itself at call-time:
Lesson 578When to Choose Arrow vs Regular Functions
delegate
to another iterable (like an array, string, or another generator).
Lesson 1113The yield* Operator: Delegating to Another IterableLesson 1823Composition with Classes
DELETE
– Remove data (like removing a book from the library)
Lesson 2268Request Methods and HTTP Verbs
Deleted objects
that were garbage collected
Lesson 1887Comparing Two Snapshots
Deletes `node_modules` entirely
before installing (always starts fresh)
Lesson 2494npm ci for Reproducible Installs
Delta (Δ)
the size difference
Lesson 1887Comparing Two Snapshots
Deno
and **Bun** are newer runtimes built to address some of Node.
Lesson 19Deno and Bun: Alternative Runtimes
Deno runtime
has different security permissions and uses URLs for imports
Lesson 20Why Runtime Differences Matter
Dependency injection
pass the impure dependencies as arguments instead of calling them directly inside your function.
Lesson 1750Handling External Dependencies Purely
Dependency Lock-In
If your project depends on libraries using legacy decorators, you're tied to that syntax until those libraries update.
Lesson 2105When You Might Still See Legacy Decorators
Dependency management
No clear way to express "this file needs that file"
Lesson 1396What Are ES Modules?
Deprecation warnings
for features you plan to remove (with the feature still working)
Lesson 2520MINOR: Backward-Compatible Features
Depth matters most
Calling `flat(Infinity)` on a deeply nested array forces JavaScript to traverse every level.
Lesson 895Performance Characteristics of flat() and flatMap()
Derived state
is data calculated from other data sources.
Lesson 2143Derived State and Automatic Recalculation
Descriptive names
over cryptic abbreviations: `userAge` beats `ua`
Lesson 69Variable Naming Rules
Desktop Applications
Popular apps like Visual Studio Code, Slack, and Discord are built with JavaScript using Electron.
Lesson 5JavaScript Beyond the Browser
Detached Buffers
After transferring an `ArrayBuffer`, the original becomes unusable (detached).
Lesson 2177Error Handling in Cross-Context Messaging
Detached DOM nodes
(elements removed from the page but still in memory)
Lesson 533Debugging Closure Memory Issues
Detached DOM trees
are referenced in JavaScript but removed from the page
Lesson 1870What Qualifies as a Memory Leak in JavaScript
Deterministic
Same input in same state always produces same result
Lesson 2425What Is a Finite-State Machine?
Development debugging
Catch mistakes where you forgot error handling
Lesson 1506Process Event: 'unhandledRejection'
Development experience
They enable hot module replacement for instant feedback
Lesson 2453What is a bundler and why do we need one?
Development mode
Vite serves your source files as native ES modules directly to the browser.
Lesson 2459Vite: Development server meets bundler
Development workflows
`"dev": "node --watch app.
Lesson 2511The Scripts Field in Package.json
Diffs become meaningful
Style noise doesn't obscure actual changes
Lesson 2604Consistent Style vs. Personal Preference
Direct dependencies
you specified in `package.
Lesson 2533PNPM's Strict node_modules Structure
Direct Memory Access
Because `Uint8Array`, `Float32Array`, and friends store elements in a predictable format, JavaScript engines can skip type checks and directly manipulate memory.
Lesson 2330Performance Characteristics
Disable a rule entirely
by setting it to `"off"` or `0`
Lesson 2569Overriding Rules in Extended Configs
Disk space waste
Every project got its own complete copy of every dependency.
Lesson 2527Why Alternative Package Managers Exist
Distance calculations
are the classic example.
Lesson 1596Math.abs for Absolute Values
Distinguish error categories
– Use `instanceof` to handle different failures differently
Lesson 1151Why Custom Error Classes
Division by zero
(with a positive number):
Lesson 121Infinity and -Infinity
Division truncates
Unlike regular division, BigInt division always returns just the whole number part, throwing away any remainder.
Lesson 1969BigInt Arithmetic Operations
Do wrap
code that genuinely might throw errors you can handle:
Lesson 1136Try/Catch Performance Considerations
DOM (Document Object Model)
is accessed through `document` and represents your HTML page as a tree of objects you can manipulate with JavaScript.
Lesson 1490The DOM and Window as Browser-Specific APIs
DOM reflows
Each change can trigger a layout recalculation
Lesson 1900Batch Operations vs Individual Updates
Domain language
that makes tests self-documenting
Lesson 2681Custom Matchers
don't
attach them to the returned object, they remain trapped in the function's scope.
Lesson 1807Privacy in Factories with ClosuresLesson 2521PATCH: Bug Fixes and Safe Updates
Don't create custom errors
for every little thing.
Lesson 1160Best Practices for Custom Errors
Downloads
the `lodash` package and all its dependencies from the npm registry
Lesson 2486Installing Packages with npm install
Drain all microtasks
run every microtask in the microtask queue until it's empty
Lesson 1195The Event Loop Tick CycleLesson 1214Order of Execution in the Loop
Drain occurs
Once the buffer empties enough, the stream emits a `'drain'` event
Lesson 1576How Backpressure Works Internally
Draw three columns
Call Stack | Microtask Queue | Task Queue
Lesson 1220Mental Model for Debugging Async
Drill into specific instances
to see what's keeping them alive (their retaining path)
Lesson 1888Filtering by Constructor Name
Drop
(skip) the first `n` values and continue with the rest
Lesson 2053Taking and Dropping with Iterators
Duck-typed confusion
Any object can claim to be a functor by having a `map` method, but without types, you can't verify it follows the rules.
Lesson 1799Functor/Monad Pattern Mismatch in JS
Duplex
(both), and **Transform** (modify data as it flows).
Lesson 1548What Are Streams?Lesson 1550The Four Stream Types
Duplicates are meaningful
(like a shopping cart with 3 apples)
Lesson 1054When to Use Sets vs Arrays
During transition
while moving from one state to another
Lesson 2429Adding Side Effects and Actions
Dynamic `import()` is promise-based
it returns a promise immediately and loads the module asynchronously.
Lesson 1429Dynamic Import vs require()
Dynamic access is possible
Code could call methods via bracket notation or reflection
Lesson 2471Tree Shaking Class Methods
Dynamic behavior
Adjust logic based on which defaults were applied
Lesson 2217ResolvedOptions to Inspect Settings
dynamic binding
, meaning the value of `this` is determined at *runtime* based on how the function is invoked, not where it's defined.
Lesson 535Dynamic Binding ExplainedLesson 537Why 'this' Uses Dynamic BindingLesson 538The Four Binding Rules PreviewLesson 571Lexical 'this' vs Dynamic 'this'
Dynamic content updates
with dozens or hundreds of translatable strings
Lesson 2253Deciding Between Built-ins and Libraries
Dynamic dependencies
If value B depends on A, and C depends on both, Signals or computed observables track these relationships automatically.
Lesson 2139Identifying Problems Suited for Reactive Patterns
Dynamic import
is different: it's a function-like syntax (`import()`) that loads modules **on demand**, during runtime, whenever and wherever you call it.
Lesson 1420What is Dynamic Import?Lesson 1453Requiring ESM from CJS
Dynamic imports
use runtime expressions.
Lesson 2467Static vs Dynamic Imports
Dynamic lists
You're formatting lists of user-generated content or data that changes frequently
Lesson 2246When to Use ListFormat and DisplayNames
Dynamic Scope
The variable's location is determined by where the function is *called* from.
Lesson 490Static vs Dynamic Scope

E

EACCES
(Error ACCESs) means you lack permission to read, write, or execute the file.
Lesson 1530Error Handling Patterns in FS Operations
eager
it processes the entire array immediately, creating a new array with all transformed values.
Lesson 1122Lazy Map with GeneratorsLesson 2128Observables vs Promises
Early exit scenarios
Stop processing as soon as you find what you need (no wasted computation)
Lesson 1127When to Choose Lazy vs. Eager
Early returns
let you handle errors at the top of your callback and exit immediately:
Lesson 1255Limiting Nesting Depth
Early termination
Need the first 5 matches from a billion records?
Lesson 2055When Lazy Evaluation Wins
Easier to learn
The syntax (how you write code) reads more naturally
Lesson 1JavaScript: A High-Level Programming Language
Easier to read
Variable names immediately describe what you're pulling out
Lesson 915What is Array Destructuring?
Easier to reason about
(no hidden I/O)
Lesson 1750Handling External Dependencies Purely
Easier to understand
– each step is explicit and named
Lesson 1777What is Function Composition?
Easy defaults
Check for missing properties and provide fallbacks
Lesson 672Passing Configuration Objects
ECMAScript is the specification
(the rulebook), while **JavaScript is an implementation** (the actual language you write code in).
Lesson 3JavaScript vs ECMAScript
Ecosystem Support
NPM is the default—every package works with it, every tutorial assumes it, and CI/CD pipelines support it without configuration.
Lesson 2536Choosing the Right Package Manager
Editor settings
– Personal preferences stored in your code editor (VS Code, WebStorm, etc.
Lesson 2588Editor Settings vs Project Config
EEXIST
means a file or directory already exists when you tried to create it.
Lesson 1530Error Handling Patterns in FS Operations
effect
is a function that runs automatically when the signals it depends on change.
Lesson 2120Effects and Side EffectsLesson 2186Atomics.compareExchange for Lock-Free Updates
Email attachments
MIME uses Base64 to encode files
Lesson 2353What is Base64 and Why It Exists
Embedding images in HTML/CSS
Data URLs like `<img src="data:image/png;base64,iVBORw0KG.
Lesson 2353What is Base64 and Why It Exists
Emit events
with optional data (publish)
Lesson 2414The Event Emitter Pattern
Empty
No elements pass the test
Lesson 447Filter Returns a Subset
Empty Map
Call `new Map()` with no arguments to create an empty Map that you'll populate later.
Lesson 1032Creating a New Map
Empty string separator
(no space between elements):
Lesson 828join() to Convert Arrays to Strings
Empty the stack first
All synchronous code finishes before the event loop checks queues
Lesson 1219Tracing Execution with a Diagram
Enable frameworks
(like Angular or TypeScript experimental decorators) to inject functionality declaratively
Lesson 2067What Decorators Are and Why They Exist
Enable targeted handling
– Catch specific error types without catching everything
Lesson 1151Why Custom Error Classes
Enable the extension
for JavaScript files
Lesson 2586Prettier Editor Extensions
Encapsulate logic
the calculation stays hidden inside the object
Lesson 659Defining Getters with the 'get' Keyword
Endianness
refers to the order in which these bytes are stored.
Lesson 2329Byte Order and Endianness
Enforce through CI/CD
Even with hooks, run `npm run lint` and `npm run format:check` in continuous integration.
Lesson 2601Team Adoption and Best Practices
ENOENT
(Error NO ENTry) means "file or directory not found"—the path you specified doesn't exist.
Lesson 1530Error Handling Patterns in FS Operations
Ensures proper cleanup
when the pipeline completes or errors
Lesson 1581Pipeline for Better Error Handling
Enterprise Applications
Large companies often have strict stability requirements.
Lesson 2105When You Might Still See Legacy Decorators
enumerable
(visible in loops and listings), while others are **non-enumerable** (hidden from most common operations).
Lesson 634Enumerability and Property VisibilityLesson 644Object.getOwnPropertyNames() Includes Non-EnumerableLesson 706Enumeration and the Prototype Chain
enumerable own properties
, meaning it silently ignores non-enumerable and inherited properties.
Lesson 976Spread and Non-Enumerable PropertiesLesson 979Common Object Spread Pitfalls
Environment
`require()` is Node.
Lesson 1429Dynamic Import vs require()
Equality operators
`==`, `===`, `!
Lesson 266Precedence Levels Overview
Error detection
without leaving JavaScript
Lesson 2609What JSDoc Is and Why It Matters
Error handling context
If you `return await`, errors are caught within the current function's scope.
Lesson 1350Await and Return Values
Error identification
The `toString()` output is more descriptive
Lesson 1153Setting the Error Name Property
Error path testing
Testing the failure case at each level means creating separate test scaffolds for errors at level 1, level 2, level 3, etc.
Lesson 1251Testing Callback Hell Code
Error prevention
Reduces mistakes from forgetting to spread a level
Lesson 1762Immutability Helpers and Libraries
Error-first callbacks
(also called "Node-style callbacks") are a pattern where callback functions always receive an error object as their **first argument**, followed by any result data.
Lesson 1232What Are Error-First Callbacks?
ES Modules (ESM)
the newer, standardized system using `import` and `export`
Lesson 1540CommonJS require() vs ES Module import
ES Modules load asynchronously
the browser or runtime can fetch and parse multiple files in parallel before executing any code.
Lesson 1450CJS and ESM: Two Module Systems
ESLint v8 or earlier
(flat config didn't exist before v8.
Lesson 2575Choosing Between Legacy and Flat Config
ESM
creates a live binding—changes in the original module reflect in imports.
Lesson 1540CommonJS require() vs ES Module import
ESM-first
Modern approach, supports tree-shaking, works everywhere with proper tooling
Lesson 1458Practical Interop StrategiesLesson 2472CommonJS and Tree Shaking Limitations
ESM-only
, you'll need ESM (or dynamic `import()` workarounds).
Lesson 1547Choosing Between CJS and ESM
Establish a baseline
with concrete metrics (load time, memory usage, FPS)
Lesson 1918Why Measurement Matters
Event coordination
Wait for multiple events to fire before proceeding
Lesson 519Callback Queues
Event emissions
Triggering change events repeatedly
Lesson 1900Batch Operations vs Individual Updates
Event emitters
excel at decoupled pub-sub communication but don't inherently model state.
Lesson 2434FSMs vs Other Patterns
Event listeners
remain attached to removed DOM elements
Lesson 1870What Qualifies as a Memory Leak in JavaScript
Events/inputs
External triggers that cause transitions
Lesson 2425What Is a Finite-State Machine?
every
string method you've learned: `trim()`, `replace()`, `slice()`, `repeat()`, `padStart()`, and all the rest.
Lesson 182Immutability: All Methods Return New StringsLesson 2627Project-Wide Type Checking with jsconfig.json
everything
an object owns, including properties marked as non-enumerable.
Lesson 630Object.getOwnPropertyNames()Lesson 1404Importing Everything with '*'
Everything else is truthy
including `"0"`, `[]`, `{}`, and even `"false"` (a non-empty string).
Lesson 312Truthy and Falsy in Conditions
Exact matching
uses the equality assertions you already know:
Lesson 2677String Matching Assertions
exact version
of every package installed, including nested dependencies.
Lesson 2499The Purpose of LockfilesLesson 2507Audit and Security in Dependencies
Exact version (no symbol)
Maximum control.
Lesson 2523Version Ranges in package.json
exceptional
and unexpected (like a network failure or invalid input)
Lesson 1149Throwing vs Returning Error ValuesLesson 2440When to Use Result vs Throw
Exceptional circumstances
occur (network failures, missing resources)
Lesson 1161Throwing vs Returning Errors
Excessive composition depth
When you chain 5+ composed functions, readers must mentally trace through each transformation.
Lesson 1796Recognizing Over-Abstraction in Functional Code
Executes
the constructor function body
Lesson 552The 'new' Keyword and Constructor Calls
Execution order analogy
Imagine three people wrapping a gift.
Lesson 2084Applying Multiple Decorators
executor function
that receives two special arguments: `resolve` and `reject`.
Lesson 1265Creating a Promise with the ConstructorLesson 1266The Executor Function
exit code
back to the operating system or parent process.
Lesson 1500Process.exit() and Exit CodesLesson 1504Process Event: 'exit'
Exit codes
how to properly end your program
Lesson 1496What is the Process Object?
Expensive computations
(complex math, recursive algorithms)
Lesson 2089Memoization Decorators
Expensive operations
If each transformation is costly (API calls, heavy computation), lazy evaluation only pays that cost for items you actually consume.
Lesson 2055When Lazy Evaluation Wins
Experimental Decorators
(TypeScript's original):
Lesson 2099Experimental Decorators vs. Stage 3 Decorators
Explicit `break`
Check a condition and exit.
Lesson 2057Lazy Iterators and For-Of
Explicit Binding
When you manually specify what `this` should be using special functions
Lesson 538The Four Binding Rules Preview
Explicit coercion
is when *you* deliberately convert types using constructors like `Number()`, `String()`, or `Boolean()`.
Lesson 274What is Type Coercion?
Explicit, discrete states
– If you can name each mode your system can be in ("loading", "authenticated", "editing"), an FSM may help.
Lesson 2432When to Use FSMs in JavaScript
Explicitness
Every failure point is **visible** in the code.
Lesson 2442Trade-offs: Verbosity vs Explicitness
Exploring object properties
Use `for.
Lesson 359For...of vs For...in: Key Differences
Expressing intent
– the matcher name documents what you're actually testing
Lesson 2681Custom Matchers
Expressions
are not hoisted—the variable exists, but it's `undefined` until the assignment runs
Lesson 381Function ExpressionsLesson 384Declaration vs Expression: Hoisting Behavior
Extensible
Add new options without breaking existing calls
Lesson 672Passing Configuration Objects
Extension disabled
– Verify it's enabled in your extensions panel
Lesson 2592Troubleshooting Editor Integration Issues
Extract nested callbacks
into separate, named functions that you pass as callbacks instead of anonymous functions
Lesson 1255Limiting Nesting Depth
Extracted functions
replace anonymous nested callbacks with named ones:
Lesson 1255Limiting Nesting Depth
Extracted methods
You pull a method off an object and pass it elsewhere, losing its original context
Lesson 557Why Manual 'this' Binding Exists
Extracts the `value`
from each result object and assigns it to your loop variable
Lesson 1077Consuming Iterators with for...of

F

Factories
Use when you need full encapsulation and simple object creation
Lesson 1813When to Choose MixinsLesson 1814Combining All Three Approaches
factory function
is simply a regular function that creates and returns a new object.
Lesson 668What Are Factory Functions?Lesson 1806Factory Functions: Return Plain Objects
Factory methods
that create instances in special ways
Lesson 789Static vs Instance: When to Use Each
Factory/Builder
Choose factories for simple object creation with varying types.
Lesson 1850When to Use Each Pattern
Fail closed
Reject unknown origins by default
Lesson 2178Security: Validating Message Origins
Fails fast
if there's any mismatch between `package.
Lesson 2494npm ci for Reproducible Installs
False sense of control
You think you're awaiting, but your code continues past the loop immediately
Lesson 1390Awaiting in Loops Without Intent
Fast rebuild times
– minimal optimizations, just enough to make code runnable
Lesson 2449Development vs Production Builds
Faster to write
You can build things quickly without getting bogged down in technical minutiae
Lesson 1JavaScript: A High-Level Programming Language
Feature Needs
Do you need built-in code coverage, snapshot testing, or mock management?
Lesson 2661Choosing the Right Test Runner
Fetch data
from servers across the internet
Lesson 17Browser Runtime: DOM and Web APIs
Fighting your configuration
If you disable the same rule everywhere, remove it from your config instead
Lesson 2607When to Disable Rules
File formats
Reading text from binary files requires decoding bytes into strings
Lesson 2343Why TextEncoder and TextDecoder Exist
File Matching
The old system used `overrides` arrays with `files` patterns.
Lesson 2573Migrating from .eslintrc to Flat Config
File size matters
Sending large images, videos, or files where bandwidth is limited
Lesson 2360Base64 Overhead and When to Avoid It
FileList
containing File objects you can then read or process.
Lesson 2368Getting Files from Input Elements
Filter
by package name, location, or dependency relationships
Lesson 2551Running Scripts Across Workspaces
Filter then map
Remove unwanted elements first, then transform what remains
Lesson 856Combining map and filter
Filtering
(removing unwanted data)
Lesson 1564Transform Streams Explained
Final-expression
`i++, j--` both execute after each loop body, before the next condition check
Lesson 346Multiple Variables in For Loops
Finally block
(optional): Runs cleanup code whether an error occurred or not:
Lesson 2435The Traditional Throw/Try-Catch Pattern
Finite states
A limited, enumerable set of possible states
Lesson 2425What Is a Finite-State Machine?
First argument
An array of the *literal string parts* (the non-interpolated text)
Lesson 152Tagged Template LiteralsLesson 558The call() MethodLesson 1232What Are Error- First Callbacks?
First attempt
Call the object's `valueOf()` method
Lesson 282Object-to-Number Coercion
First Contentful Paint (FCP)
When the first text, image, or canvas element appears on screen.
Lesson 1926Real User Monitoring Metrics
First impressions
Initial page load, time to interactive
Lesson 1934Hot Paths and Critical User Journeys
First iteration
`sum` is `0`, `price` is `10` → returns `10`
Lesson 457Summing Numbers with ReduceLesson 459Flattening Arrays with Reduce
Fix
Use an arrow function wrapper or `bind()`:
Lesson 657Common Method 'this' Pitfalls
Fixed size
Once created, a Buffer's length cannot change
Lesson 1582What is a Buffer?
Fixed-length
Once created, its size cannot change
Lesson 2332What is an ArrayBuffer?
Fixed-position matches
To check if an email ends with ".
Lesson 1676Common Mistakes and When Regex Is Overkill
Flamegraph patterns
Are generator functions showing up as bottlenecks?
Lesson 2066Profiling Iterator Performance in Real Applications
Flat chaining
(recommended):
Lesson 1295Chaining vs Nesting
Flat line after actions
Memory goes up during activity, then levels off
Lesson 1893Performance Monitor for Memory Trends
Flattening operators
automatically subscribe to these inner observables and flatten the results into a single stream.
Lesson 2134Flattening Operators
Flexibility over security
Privacy is about organization, not protection
Lesson 1991When to Use Private Fields
Flexible whitespace
`\s+` matches one or more whitespace characters, useful for splitting text where spacing varies.
Lesson 1687Combining Classes and Quantifiers
Flow resumes
Writing can safely continue
Lesson 1576How Backpressure Works Internally
Flowing Mode (Push)
The stream actively pushes data to your program as soon as it's available, triggering `'data'` events automatically.
Lesson 1553Paused vs Flowing Mode
Focus optimization efforts
only on those bottlenecks
Lesson 1905The 80/20 Rule in Performance
Follow the installation wizard
the defaults are typically fine
Lesson 2484Installing Node.js and NPM
Fonts
Typically copied to output with proper paths updated in your CSS
Lesson 2448Asset Pipeline Integration
For applications
(web apps, APIs, CLI tools), committing the lockfile is essential:
Lesson 2504Committing Lockfiles to Git
For arrays
Use `toContain()` or `toHaveLength()` instead of checking properties manually
Lesson 2683Choosing the Right Assertion
For each element
, add or modify a property on the accumulator
Lesson 864Building Objects with Reduce
For empty arrays
If your array might be empty and you don't provide an initial value, `reduce()` throws a `TypeError`.
Lesson 862The Initial Value: When to Provide It and Why
For exceptions
Use `toThrow()` instead of try-catch blocks with boolean flags
Lesson 2683Choosing the Right Assertion
For existence
Use `toBeDefined()`, `toBeNull()` instead of `toBe(undefined)`
Lesson 2683Choosing the Right Assertion
For internal application code
, underscore conventions often suffice since your team knows the rules.
Lesson 1836Choosing the Right Encapsulation Strategy
For libraries
you publish to NPM, opinions vary.
Lesson 2504Committing Lockfiles to Git
For memory-sensitive scenarios
(like game entities with thousands of instances), WeakMaps add overhead you might not want.
Lesson 1836Choosing the Right Encapsulation Strategy
For merge conflicts
Delete package-lock.
Lesson 2503When Lockfiles Get Out of Sync
For numbers
Use `toBeGreaterThan()`, `toBeLessThan()`, `toBeCloseTo()` instead of manual comparisons
Lesson 2683Choosing the Right Assertion
For staleness after edits
Run `npm install` to update the lockfile based on your new package.
Lesson 2503When Lockfiles Get Out of Sync
For strings
Use `toContain()` or `toMatch()` instead of testing `string.
Lesson 2683Choosing the Right Assertion
Forgetting the global flag
Using `match()` without the `g` flag only returns the first match.
Lesson 1676Common Mistakes and When Regex Is Overkill
Forgotten return statements
If you don't return a promise or use `await`, the test finishes before async assertions run:
Lesson 2692Avoiding False Positives with Assertions
Form validation
Only validate after the user finishes entering input.
Lesson 2383What Debounce SolvesLesson 2390Debounce vs Throttle: When to Use Which
Formatting violations
Missing semicolons, wrong quotes, inconsistent spacing
Lesson 2590Quick Fix and Auto-Fix in Editors
Formatting-only challenges
You need to display numbers, currencies, dates, or lists correctly for different locales
Lesson 2247Identifying Simple i18n Requirements
FormData
mimics HTML form submissions, great for file uploads:
Lesson 2270Request Body and Body TypesLesson 2284Request Body Basics
FormData body
→ usually auto-set to `"multipart/form-data"` (don't set manually)
Lesson 2289Content-Type Header and Body Matching
Forwards errors
from any stream to a single callback
Lesson 1581Pipeline for Better Error Handling
Fourth iteration
`sum` is `40`, `price` is `30` → returns `70`
Lesson 457Summing Numbers with Reduce
Fractional values
BigInt only handles whole numbers
Lesson 1972When to Use BigInt vs Number
Framework Compatibility
Modern libraries like React rely on immutability to detect changes efficiently.
Lesson 906Why Immutability Matters in JavaScript
Framework or plugin systems
Where untrusted code might run alongside yours
Lesson 1991When to Use Private Fields
Frameworks
(like React, Vue, or Angular) provide complete structures for building entire applications
Lesson 7The JavaScript Ecosystem
Frees their memory
, making it available for future allocations
Lesson 1864The Sweep Phase
Frequency
Code executed thousands of times (loops, event handlers, animations)
Lesson 1934Hot Paths and Critical User Journeys
Frequent membership checks
– `has()` is much faster than `includes()`
Lesson 1066Array vs Set: Handling Unique Values
Frequent recalculation
Values change often and need immediate updates
Lesson 2143Derived State and Automatic Recalculation
Frontend Masters
and **Scrimba** offer interactive video courses with browser-focused projects
Lesson 1495Where to Learn More About Web Development
FSMs
(especially with libraries like XState) for:
Lesson 2434FSMs vs Other Patterns
Fulfilled
The operation completed successfully with a result
Lesson 1263What is a Promise?Lesson 1264Promise States
Function call time
How long does each `next()` call take?
Lesson 2066Profiling Iterator Performance in Real Applications
Function called
→ Push a frame onto the stack
Lesson 1181What is the Call Stack?
function composition
scenarios where you're creating specialized versions or chaining operations.
Lesson 1776When Currying Is OverkillLesson 1784Composition vs Chaining
Function Coverage
tracks whether each function in your codebase was called at least once during testing.
Lesson 2716What Code Coverage MeasuresLesson 2718Reading Coverage Reports
function declaration
is the most traditional way to define a named function in JavaScript.
Lesson 379Function Declaration SyntaxLesson 381Function Expressions
function expression
), the hoisting behavior follows the variable's rules, not the function's.
Lesson 96Function Expressions vs DeclarationsLesson 381Function Expressions
Function inlining
is an optimization where the JavaScript engine replaces a function call with the actual body of the function itself.
Lesson 1913What Is Function Inlining?
Function name
A descriptive identifier (follows variable naming rules)
Lesson 379Function Declaration Syntax
Function returns
→ Pop that frame off the stack
Lesson 1181What is the Call Stack?
Future-proof
Matches how `let`/`const` work, even if you're using `var`
Lesson 99Best Practices: Declare Before Use

G

Game loop inputs
Process player controls at fixed rates
Lesson 2390Debounce vs Throttle: When to Use Which
Game loops or animations
Ensure frame rate consistency
Lesson 2387What Throttle Solves
Game physics engines
Workers collaboratively updating a shared world state at 60+ FPS
Lesson 2189When SharedArrayBuffer Makes Sense
Garbage collection
is the *automatic* process by which JavaScript identifies and reclaims memory that's no longer needed.
Lesson 1860What is Garbage Collection?
Garbage collection roots
are the starting points the engine uses to determine reachability.
Lesson 1862Roots and Reference Chains
General assertions
like `toBe()` or `toEqual()` work for many scenarios but give vague feedback:
Lesson 2683Choosing the Right Assertion
Generate unique IDs
for each request (timestamps, counters, or UUIDs work)
Lesson 2176Request-Response Patterns with PostMessage
Generated code
Database migrations, API client libraries, or any file created by tools
Lesson 2579Ignoring Files with .prettierignoreLesson 2607When to Disable Rules
Generated files
such as bundled JavaScript or compiled assets
Lesson 2562The .eslintignore File
Generator functions
(using `function*`) that yield multiple values and pause execution
Lesson 2038What Are Async Generators?
Generic `Error`
– Use for application-specific problems that don't fit the other categories:
Lesson 1145When to Use Specific Error Types
Geolocation API
lets you access the user's physical location (with permission).
Lesson 1494Web APIs Beyond the DOM
GET
– Retrieve data (like reading a book from a shelf)
Lesson 2268Request Methods and HTTP Verbs
getter
runs when you read a property's value, and a **setter** runs when you assign a new value to it.
Lesson 658What Are Getters and Setters?Lesson 659Defining Getters with the 'get' Keyword
Getters
and **setters** are special methods that *look* like regular properties from the outside, but execute functions behind the scenes.
Lesson 658What Are Getters and Setters?Lesson 977Spread with Getters and Setters
Getters and setters
shine when you need **validation, computation, or side effects**.
Lesson 667When to Use Getters/Setters vs Plain Properties
GitHub Packages
, **JFrog Artifactory**, and regional mirrors.
Lesson 2496The NPM Registry and Alternatives
Glob patterns
are wildcard expressions that match file paths.
Lesson 2595Configuring File PatternsLesson 2658Test Discovery and Patterns
Global
The `Buffer` class is available everywhere in Node.
Lesson 1582What is a Buffer?
Global (system-level)
Installed once on your machine, accessible from anywhere in your terminal.
Lesson 2487Local vs Global Installations
Global + Case-Insensitive (`gi`)
Find all matches regardless of case
Lesson 1728Combining Multiple Flags
Global Install
Download and store the tool permanently on your system with `npm install -g package-name`.
Lesson 2510NPX vs Global InstallLesson 2554Installing ESLint in Your Project
Global namespace pollution
happens when multiple scripts add variables or functions to the global object (`window` in browsers), creating a chaotic, conflict-prone environment.
Lesson 1466Global Namespace Pollution
global object
is a special, always-available object that sits at the top of JavaScript's scope chain.
Lesson 1459The Global Object ConceptLesson 1460Window in the Browser
Global scope pollution
All imported variables/functions become global within the worker
Lesson 2155Importing Scripts in Workers
Global Store
PNPM maintains one central location (usually `~/.
Lesson 2531PNPM's Symlink-Based Architecture
global symbol registry
a special storage area where symbols can be registered with string keys and retrieved later.
Lesson 1009The Global Symbol RegistryLesson 1025Symbol Registry for Cross-Realm Sharing
Globals and Environments
Instead of `env: { browser: true }`, you now import globals from the `globals` package and spread them into `languageOptions.
Lesson 2573Migrating from .eslintrc to Flat Config
Go-to-definition
Jump directly to `@typedef` declarations or imported types
Lesson 2648Editor Experience with JSDoc
God Object
(or "God Class") is an antipattern where one class or object tries to do everything.
Lesson 1851God Objects: When One Class Does Everything
Good news
Modern garbage collectors use mark-and-sweep algorithms that handle circular references automatically.
Lesson 1877Circular References in Modern Engines
Graceful degradation
Return partial results instead of total failure
Lesson 1281Recovering from Errors with .catch()Lesson 1313Use Cases for allSettled
Graceful shutdown
Clean up resources before exiting
Lesson 1506Process Event: 'unhandledRejection'
Gradual adoption
add types to critical functions first
Lesson 2609What JSDoc Is and Why It Matters
Graph Complete
When no new dependencies are found, you have a complete graph of every module your app depends on.
Lesson 2446Dependency Resolution
greedy
they match as many characters as possible while still allowing the overall pattern to succeed.
Lesson 1686Greedy vs Lazy QuantifiersLesson 1733Greedy vs Lazy Quantifiers
Grind beans
→ produces ground coffee
Lesson 477What is Function Composition?
Grouping Related Functions
Keep functions that work together physically close in your file.
Lesson 426Best Practices for Function Ordering
Guaranteed insertion order
Iteration always follows the order you added entries
Lesson 1031What is a Map and Why Use It?
Guard clauses
Check invalid inputs at the function's start
Lesson 420Early Returns for Control Flow
Guards and actions
seamlessly integrated
Lesson 2433FSM Libraries: XState Overview

H

Handle timers
with setTimeout and setInterval
Lesson 17Browser Runtime: DOM and Web APIs
Hard Links
When you install a package, PNPM creates hard links from the store to your project's `node_modules/.
Lesson 2531PNPM's Symlink-Based Architecture
hard privacy
you literally *cannot* access a private field from outside the class.
Lesson 1986Private Fields Are Hard PrivateLesson 1991When to Use Private Fields
Hard to change
Modifying one feature risks breaking unrelated features buried in the same class.
Lesson 1851God Objects: When One Class Does Everything
Hard to modify
adding steps means more nesting
Lesson 1242What is Callback Hell?
Hard to read
tracking logic flow becomes mental gymnastics
Lesson 1242What is Callback Hell?
Hard to understand
When a class has 50 methods spanning different concerns, no one knows what it really *does*.
Lesson 1851God Objects: When One Class Does Everything
Harder maintenance
Future developers (including you) struggle to modify "optimized" code
Lesson 1928Premature Optimization Is the Root of All Evil
HEAD
(like GET but only retrieves headers), or **OPTIONS** (asks what methods are allowed).
Lesson 2258Fetch and HTTP Methods
Head-of-line blocking
requests waited in queue
Lesson 2443The Module Problem in Browsers
Headers interface
gives you a structured, object-like way to manipulate these key-value pairs.
Lesson 2269Request Headers Object
Heap snapshot
Captures the current state of all objects in memory (what you'll use most often)
Lesson 1884Opening DevTools Memory Profiler
Heavy computations
called repeatedly (complex math, parsing, formatting)
Lesson 2378When Memoization Helps Performance
Helpful warnings
– extra runtime checks and developer-friendly error messages
Lesson 2449Development vs Production Builds
Heterogeneous binary structures
(file headers, network protocols)
Lesson 2341DataView vs Typed Arrays
Hexadecimal (`0x` prefix)
Uses digits 0-9 and letters A-F:
Lesson 101Number Literals: Decimal, Hex, Octal, Binary
hidden classes
(also called "shapes" or "maps") that describe the structure of your objects.
Lesson 1906What Are Hidden Classes?Lesson 1908Object Shape and Property OrderLesson 1912Initializing Objects Consistently
Hidden dependencies
A MINOR update pulls in a transitive dependency with breaking changes
Lesson 2526Semver in Practice: Trust and Reality
Hiding sensitive data
Lesson 685ToJSON Method
Hierarchical (nested) states
with automatic entry/exit logic
Lesson 2433FSM Libraries: XState Overview
hierarchy
that reduces duplication and models real-world relationships naturally.
Lesson 2431Nested and Hierarchical StatesLesson 2664Nested Describe Blocks for Hierarchical Structure
High water mark reached
When the buffer size exceeds a threshold (default 16KB), `write()` returns `false`
Lesson 1576How Backpressure Works Internally
High-frequency updates
Continuous data streaming (audio buffers, game state, sensor data)
Lesson 2179PostMessage vs Shared Memory: When to Use Each
High-resolution
provides fractional milliseconds (microsecond precision)
Lesson 1920Performance.now for High-Resolution Timing
High-volume situations
where loop performance matters:
Lesson 371Why Loop Performance Matters
higher-order function
is simply a function that does at least one of these two things:
Lesson 435The Higher-Order Function ConceptLesson 439What Makes a Function Higher-Order
Historical Changes
Countries occasionally change their timezone rules permanently.
Lesson 1640Timezone Offset Changes Over Time
History states
that remember previous substates
Lesson 2433FSM Libraries: XState Overview
Hoisting
JavaScript "lifts" `var` declarations to the top of their scope before running your code, which can lead to confusing situations where you reference a variable before you've written its declaration.
Lesson 66Declaring Variables with varLesson 391The Function Statement in BlocksLesson 2505Dependency Hoisting and Deduplication
Homogeneous numeric sequences
(pixel data, audio samples, coordinate arrays)
Lesson 2341DataView vs Typed Arrays
Hot Module Replacement (HMR)
– updating code in the browser without full page reloads
Lesson 2449Development vs Production BuildsLesson 2450Hot Module Replacement
hot paths
code that runs thousands or millions of times per second (like game loops, animations, or data processing)—this overhead can accumulate.
Lesson 1775Performance ConsiderationsLesson 1786Performance ConsiderationsLesson 1903When Micro-Optimizations Do MatterLesson 2063For-Of Loop Performance Compared to For Loop
Hours
Get the remainder, divide by `3,600,000` (60 × 60 × 1000)
Lesson 1629Converting Milliseconds to Human-Readable Durations
How critical is correctness
(mission-critical → library)
Lesson 2413When to Use Libraries vs Rolling Your Own
However
, when expressions become complex or use less common operators, parentheses become your friend.
Lesson 273When to Rely on Precedence vs Parentheses
HTML
, and **YAML** files—no additional plugins required for these common formats.
Lesson 2583Prettier for More Than JavaScript
HTML structure
and **CSS styling** deeply—the three form an inseparable trio.
Lesson 1495Where to Learn More About Web Development
Huge datasets
(tens of thousands of items or more)
Lesson 374For vs ForEach vs For...of Performance
Human readability
Debugging or logging when you need to copy/paste binary data as text
Lesson 2360Base64 Overhead and When to Avoid It
Hundreds of HTTP requests
slowing page load
Lesson 2452The Performance Trade-Off
Husky
is a tool that makes Git hooks easy to install, configure, and share across your entire team.
Lesson 2598Git Hooks and Husky

I

I/O-bound tasks
spend most of their time *waiting* for external operations to complete.
Lesson 2190CPU-Bound vs I/O-Bound Tasks
IANA time zone identifiers
like `"America/New_York"`, `"Europe/London"`, or `"Asia/Tokyo"`.
Lesson 2213Time Zones with the timeZone Option
Identifies unmarked objects
these are no longer reachable from any root
Lesson 1864The Sweep Phase
Identify real bottlenecks
find the slowest 20% causing 80% of problems
Lesson 1901The Danger of Premature Optimization
Identify the loop variable
which variable controls the condition?
Lesson 339Avoiding Infinite Loops in While
Identify the real bottleneck
using DevTools Performance tab or heap snapshots
Lesson 1918Why Measurement Matters
If false
Skip the loop body entirely and continue with code after the loop
Lesson 338While Loop Execution Flow
If it rejects
, the test fails with the rejection reason
Lesson 2686Returning Promises from Tests
If it resolves
, the test passes
Lesson 2686Returning Promises from Tests
If the promise rejects
An exception is thrown at that line
Lesson 1353Why Try/Catch Works with Async Functions
If the promise resolves
You get the value
Lesson 1353Why Try/Catch Works with Async Functions
If true
Execute the loop body, then go back to step 1
Lesson 338While Loop Execution Flow
Ignore everything else
until measurements prove it matters
Lesson 1931The 80/20 Rule in Performance Work
Ignored Promises
`forEach` doesn't collect return values, so your awaited Promises just float away unhandled
Lesson 1390Awaiting in Loops Without Intent
Image processing pipelines
Workers reading/writing pixels in shared image buffers
Lesson 2189When SharedArrayBuffer Makes Sense
Images
Can be inlined as Base64 data URLs (for small files), copied to the output directory with hashed filenames, or returned as file paths
Lesson 2448Asset Pipeline Integration
Immediately exits
the function, stopping any further code from running
Lesson 418What Return Statements Do
immediately-invoked function expression (IIFE)
to fix the loop closure trap.
Lesson 503Fixing Loop Closures with IIFELesson 527Solving Loop Closures with IIFEs
Immer
make immutable updates feel as easy as writing regular mutating code.
Lesson 1762Immutability Helpers and Libraries
Immutability
means keeping data unchanged.
Lesson 689Why Object Cloning Matters
Implementing undo/redo features
Keeping snapshots of previous states is trivial when you never change existing arrays.
Lesson 837When to Prefer Non-Mutating Methods
Implements details
users shouldn't care about
Lesson 1987Private Methods
Implicit coercion
happens automatically—JavaScript does it for you without asking.
Lesson 274What is Type Coercion?
Import sorting
Alphabetizing or organizing imports
Lesson 2590Quick Fix and Auto-Fix in Editors
Impossible states occur
something that "should never happen" does
Lesson 1140The throw Statement
Improve debugging
– Clear names like `InsufficientFundsError` beat generic `Error` messages
Lesson 1151Why Custom Error Classes
Improving readability
– `expect(response).
Lesson 2681Custom Matchers
Impure functions
(results depend on external state, not just arguments)
Lesson 2378When Memoization Helps Performance
In Chrome
V8 runs all the JavaScript on websites you visit
Lesson 10V8: Chrome and Node.js
In Node.js
The exact same V8 engine runs JavaScript on servers and computers (outside the browser)
Lesson 10V8: Chrome and Node.jsLesson 2027Built-in Async Iterables
Incomplete Type Coverage
Advanced TypeScript features like mapped types, conditional types, and template literal types either don't work or require awkward workarounds in JSDoc.
Lesson 2621Editor Support and Limitations
Inconsistent handling
Different callbacks might handle errors differently
Lesson 1244Error Handling Complexity
Inconsistent Tooling
While VS Code excels at JSDoc inference, other editors vary widely in quality.
Lesson 2621Editor Support and Limitations
Incremental file building
Adding sections to a report over time
Lesson 1521Appending to Files with fs.appendFile()
Independence
Each counter is isolated
Lesson 510Counter Factories
Index 1
The path to your script file
Lesson 1497Process.argv: Command-Line Arguments
Index 1, 2, 3
The captured values from each group (in order)
Lesson 1700Accessing Captured Values with exec()
Index 2 onward
Your actual command-line arguments
Lesson 1497Process.argv: Command-Line Arguments
IndexedDB
Offline applications, large datasets, complex queries
Lesson 1493Browser Storage Mechanisms
infinite iterator
keeps producing values indefinitely, which is useful for things like generating unique IDs, creating number sequences, or simulating ongoing events.
Lesson 1093Infinite IteratorsLesson 2051Fibonacci as an Infinite Iterator
Infinite or unknown-length data
Generate values indefinitely or until a condition is met
Lesson 1127When to Choose Lazy vs. Eager
Infinite scroll
Load more content as the user scrolls near the bottom.
Lesson 1478IntersectionObserver
Infinity behaves mathematically
Lesson 208Comparing Numbers
Infrequent communication
Occasional messages between main thread and workers
Lesson 2179PostMessage vs Shared Memory: When to Use Each
Inheritance complicates analysis
Subclasses might rely on parent methods in unpredictable ways
Lesson 2471Tree Shaking Class Methods
Initialization runs once
Any setup code at the top level of a module executes only on the first import.
Lesson 1407Modules Are Singletons
Initialize counters at 0
unless you have a specific reason not to
Lesson 349Classic Off-by-One Errors
Initialized Map
Pass an iterable of `[key, value]` pairs (typically an array of arrays) to create a Map with initial entries.
Lesson 1032Creating a New Map
Inline errors
Red squiggles appear when you pass wrong types or access nonexistent properties
Lesson 2648Editor Experience with JSDoc
Inline module code
directly where it's needed
Lesson 1437Cache Behavior in Development vs Production
Inline snapshots
solve this by embedding the snapshot value directly in your test code using `toMatchInlineSnapshot()`.
Lesson 2710Inline Snapshots
Inner layers (filling)
Pure functions — business logic, transformations, calculations
Lesson 1751When Impurity Is Unavoidable
Inner scope
(the `inner` function) — not found
Lesson 487Scope Chain Fundamentals
Input
We store "Alex" in a variable called `userName`
Lesson 30Your First Complete JavaScript Program
Input lag
Button clicks feel delayed or ignored
Lesson 2191Main Thread Blocking and User Experience
Input validation fails
a function receives invalid arguments
Lesson 1140The throw Statement
Inside try/catch
Use `return await` when you want errors caught by a local try/catch block:
Lesson 1350Await and Return Values
inside-out
or **right-to-left**, which is the opposite of how we naturally think.
Lesson 478Manual Composition with Nested CallsLesson 1778Manual Composition: Nested Calls
Install
Run the installer and follow the prompts (default settings work fine)
Lesson 29Setting Up a Local Development Environment
Installs exact versions
from the lockfile, no resolution attempts
Lesson 2494npm ci for Reproducible Installs
Instance → Child prototype
Your instance's `__proto__` points to `ChildClass.
Lesson 775The Prototype Chain with Extends
Instance methods
can access private instance fields directly:
Lesson 794Accessing Private Fields in Methods
Int
vs **UInt**: signed vs unsigned
Lesson 1585Reading from Buffers
Integer-like keys first
(in numeric order)
Lesson 646Iteration Order and When It Matters
Integration tests
verify that multiple components work together correctly.
Lesson 2671Balancing Test Granularity
Inter-process communication
Processes can signal each other by PID
Lesson 1501Process.pid and Process.ppid
Internal projects
Where your team follows conventions
Lesson 1991When to Use Private Fields
Internal refactoring
invisible to users
Lesson 2521PATCH: Bug Fixes and Safe Updates
Interpolation
of variables within translated messages
Lesson 2253Deciding Between Built-ins and Libraries
Interpretation
means reading and executing code line-by-line, on the fly.
Lesson 14Interpretation vs Compilation
Intl.PluralRules
solves this by encapsulating the Unicode CLDR plural rules for every locale.
Lesson 1659Intl.PluralRules Overview
Invoked services
for async side effects
Lesson 2433FSM Libraries: XState Overview
IoT (Internet of Things)
JavaScript can control smart home devices, robots, and even drones.
Lesson 5JavaScript Beyond the Browser
ISO 8601
formatted strings (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.
Lesson 1616Date.parse for String to Timestamp Conversion
ISO 8601 date-only format
(like `"2024-03-15"`) is interpreted as **UTC midnight**
Lesson 1635The Date Constructor's Timezone Trap
ISO 8601 date-only strings
(like `"2024-03-15"`) are parsed as **UTC midnight**
Lesson 1618Parsing Ambiguity with Local vs UTC
Isolation
Variables inside an IIFE don't leak into the outer scope:
Lesson 386Immediately Invoked Function Expressions (IIFE)
Iteration awkwardness
There's no simple, direct way to iterate over just the data you stored without worrying about inherited properties.
Lesson 1065Object vs Map: When Objects Fall Short
iterator result object
, and it's the standard way iterators communicate their state.
Lesson 1075The Iterator Result ObjectLesson 1101The Value and Done Properties
Iterator Reuse Patterns
The iterable-iterator pattern (where an object can spawn fresh iterators) is more explicit and debuggable when written manually.
Lesson 1095When Custom Iterators Beat Generators

J

Japanese
has *no* grammatical plurals at all
Lesson 2228Understanding Pluralization Across Languages
JavaScript engine
is a special program that reads your JavaScript code and executes it.
Lesson 9What is a JavaScript Engine?
JavaScript is an implementation
(the actual language you write code in).
Lesson 3JavaScript vs ECMAScript
JavaScript Object Notation
.
Lesson 677What is JSON?
JavaScript objects
are **live data structures** in memory.
Lesson 687JSON vs JavaScript Objects
JavaScript quirk
, not a feature you should rely on.
Lesson 99Best Practices: Declare Before Use
JavaScript the language
doesn't include things like `document`, `window`, `alert()`, or `getElementById()`.
Lesson 1490The DOM and Window as Browser-Specific APIs
JavaScript.info
covers browser environments, DOM manipulation, and events in depth
Lesson 1495Where to Learn More About Web Development
Jest
has been the dominant test runner for years, especially in React projects.
Lesson 2652The Test Runner Landscape
JFrog Artifactory
, and regional mirrors.
Lesson 2496The NPM Registry and Alternatives
JIT (Just-In-Time) compilation
.
Lesson 10V8: Chrome and Node.js
JIT compilation
a hybrid approach that combines the best of both worlds.
Lesson 14Interpretation vs Compilation
JS
when you need programmatic configuration or complex logic.
Lesson 2565Understanding ESLint Configuration Files
JS event listeners
Total active listeners
Lesson 1893Performance Monitor for Memory Trends
JS heap size
Total memory your JavaScript is using
Lesson 1893Performance Monitor for Memory Trends
JSDoc
to document your internal function signatures and type shapes.
Lesson 2650The Pragmatic Middle Ground
JSDoc with `@ts-check`
offers type safety without the complexity of TypeScript's compiler, configuration files, and build pipeline.
Lesson 2643Assessing Project Complexity and Team Size
JSON body
→ `"Content-Type": "application/json"`
Lesson 2289Content-Type Header and Body Matching
JSON parsing
produces `any`-typed data that bypasses all checks
Lesson 2632Why Runtime Validation Matters
JSON serialization
and **simple data structures**.
Lesson 1069When Objects Still Win: JSON and Plain Data
Just-In-Time (JIT) compilation
is JavaScript's clever solution that combines both approaches.
Lesson 15Just-In-Time (JIT) Compilation

K

Keep class definitions clean
by separating *what* the code does from *how* it's enhanced
Lesson 2067What Decorators Are and Why They Exist
Keep internal properties private
while exposing a clean interface
Lesson 658What Are Getters and Setters?
Keep your interface clean
users access it like a property, not a method
Lesson 659Defining Getters with the 'get' Keyword
Key type limitations
Object keys are always converted to strings (or symbols).
Lesson 1065Object vs Map: When Objects Fall Short
Key-value pairs
→ Consider `Object` or `Map`
Lesson 1072Decision Framework: Choosing the Right Collection
keywords
written in all lowercase letters — they're not strings, so they have no quotes around them.
Lesson 192The Boolean Type and Its Two ValuesLesson 2485npm init and Creating package.jsonLesson 2492npm search and Finding Packages

L

label
is a name you attach to a loop, letting you specifically target that loop with `break` or `continue` statements—even from inside nested loops.
Lesson 366Labeled statements: Targeting specific loopsLesson 2613Object Type Shapes with Inline Syntax
large collections
with frequent lookups by key, Map typically outperforms objects.
Lesson 1071Collection Size and Memory ConsiderationsLesson 1763Performance Considerations with Immutability
Large data files
JSON fixtures or configuration that would slow Prettier down
Lesson 2579Ignoring Files with .prettierignore
Large datasets
When processing millions of items where only a subset is needed, iterators avoid allocating massive arrays upfront.
Lesson 2065When Iterators Beat Arrays: Infinite and Large Sequences
Large file sizes
without minification or tree-shaking
Lesson 2452The Performance Trade-Off
Large identifiers
like database IDs, cryptographic keys, or API tokens often exceed the safe integer range.
Lesson 126When to Use BigInt Instead
Largest Contentful Paint (LCP)
When the largest visible content element finishes rendering.
Lesson 1926Real User Monitoring Metrics
Latest
The absolute newest published version, regardless of your version constraints
Lesson 2493npm outdated and Version Checking
Launch
Open VS Code—you'll see a welcome screen
Lesson 29Setting Up a Local Development Environment
lazy evaluation
values are produced only when requested.
Lesson 1098The Yield KeywordLesson 1119What Makes a Sequence Lazy?
Lazy loading images
Only load images when they're about to appear on screen, saving bandwidth and improving page load time.
Lesson 1478IntersectionObserver
LCP
, observe `largest-contentful-paint`:
Lesson 1926Real User Monitoring Metrics
LE
vs **BE**: little-endian vs big-endian byte order
Lesson 1585Reading from Buffers
Leading
Button clicks, game controls — you want instant feedback but prevent spamming
Lesson 2385Leading vs Trailing Edge DebounceLesson 2389Leading and Trailing Options in Throttle
leading edge
(also called "immediate") and **trailing edge** (the default).
Lesson 2385Leading vs Trailing Edge DebounceLesson 2389Leading and Trailing Options in Throttle
Leading/trailing edge control
Fine-tune when your function fires
Lesson 2392Using Lodash or Underscore Implementations
Learning curve
New team members must understand *why* each rule exists
Lesson 2606The Cost of Configuration
Left
(traditionally for errors) and **Right** (for success values).
Lesson 1167Result Types and Either Pattern
Legacy codebases
Where private fields aren't supported yet
Lesson 1991When to Use Private Fields
Legacy Node.js projects
built before ES modules became stable
Lesson 1449When to Use CommonJS in Modern Projects
Legacy systems
Older APIs that don't support binary data
Lesson 2360Base64 Overhead and When to Avoid It
Less repetitive code
No need to write `array[0]`, `array[1]`, repeatedly
Lesson 915What is Array Destructuring?
Less typing
– no `function` keyword needed
Lesson 648Methods vs Function Properties
Lexical scope
(also called **static scope**) means that a function's access to variables is determined by its physical location in the code when you *write* it, not where you *call* it.
Lesson 82Lexical ScopeLesson 88Scope and Closures PreviewLesson 486What is Lexical Scope?Lesson 491Nested Functions and Scope AccessLesson 535Dynamic Binding ExplainedLesson 539Lexical Variables vs 'this'
lexically capture
`this` from their surrounding (enclosing) scope at the moment they're defined.
Lesson 396Arrow Functions and 'this' BindingLesson 573Callbacks and Lexical 'this'
Library authors
who want one codebase for all platforms
Lesson 1461GlobalThis for Universal Code
LIFO
(Last In, First Out) order means the most recent function must complete before control returns to earlier ones.
Lesson 1184Visualizing the Stack During Execution
Lightweight
No performance cost or complex patterns needed
Lesson 1829Convention-Based Privacy with Underscore Prefix
Limit depth
Show only top-level dependencies:
Lesson 2491npm list and Viewing Installed Packages
Limited concurrent connections
per domain (typically 6)
Lesson 2443The Module Problem in Browsers
Limited locale support
You're targeting a specific set of locales, not 100+ languages
Lesson 2247Identifying Simple i18n Requirements
Lint-staged
is a tool that runs linters (like ESLint) and formatters (like Prettier) **only on Git-staged files**— the ones you're about to commit.
Lesson 2593What is Lint-Staged?
List of unique tags
Set (uniqueness enforced)
Lesson 1072Decision Framework: Choosing the Right Collection
literal syntax
, **immediate readability**, and **universal compatibility** with JSON APIs and serialization.
Lesson 1069When Objects Still Win: JSON and Plain DataLesson 1665Creating Regex Patterns: Literals vs Constructor
Little-endian
Least significant byte first (reversed order)
Lesson 2329Byte Order and EndiannessLesson 2339Endianness in DataView
Live Server
Lets you preview HTML files in your browser instantly
Lesson 29Setting Up a Local Development Environment
Load Time Budgets
"First Contentful Paint must be under 1.
Lesson 1932Setting Performance Budgets
Local (project-level)
Installed in the current project's `node_modules` folder.
Lesson 2487Local vs Global Installations
Local scope operations
If you create an array within a function and manipulate it before returning, mutation is safe because no external code can access that intermediate state:
Lesson 914When to Mutate: Performance Trade-Offs
Local variables
Any variables declared inside the function
Lesson 1183Stack Frames and Function Context
Locales
can be a string like `'en-US'` or an array of locale identifiers.
Lesson 2220Creating a RelativeTimeFormat Instance
Localization is required
Your interface must adapt to the user's locale, not just translate static strings
Lesson 2246When to Use ListFormat and DisplayNames
Locks you into assumptions
made by all parent classes
Lesson 1852Inheritance Hierarchies That Are Too Deep
Lodash
and **Underscore** have been refined through years of real-world use, handling edge cases you might not anticipate.
Lesson 2392Using Lodash or Underscore Implementations
Lodash memoize
provides a robust memoization utility with features like:
Lesson 2382Libraries and Built-In Approaches
Log it
Record the error and continue (or stop)
Lesson 1235Handling Errors in Error-First Callbacks
Log suspicious activity
Track rejected messages for security monitoring
Lesson 2178Security: Validating Message Origins
Logging
Including the PID in log files helps you correlate logs when multiple instances run simultaneously
Lesson 1501Process.pid and Process.ppidLesson 1521Appending to Files with fs.appendFile()Lesson 2080Accessor Decorators (Getters and Setters)
Logging/analytics
where failure of one tracker shouldn't block others
Lesson 1317allSettled for Independent Operations
Logic errors
Valid syntax but likely bugs (unused variables, unreachable code)
Lesson 2602What Linters Actually DoLesson 2603Automation vs. Human Judgment
Logic is stateless
Utility functions like `formatCurrency(amount)` don't need object wrappers.
Lesson 1859When to Use OOP vs Other Paradigms
Long-lived Objects
Server connections, database pools, or any object that emits status updates throughout its lifetime
Lesson 2424Event Emitter Use Cases and Alternatives
Look for yellow nodes
in the snapshot summary—these indicate detached DOM elements
Lesson 1891Identifying Detached DOM Nodes
Look outward
to the nearest enclosing regular function or global scope
Lesson 579Debugging 'this' in Arrow Functions
Lookahead
and **lookbehind** are zero-width assertions.
Lesson 1711What Are Lookahead and Lookbehind?
Loose equality (`==`)
allows comparison between BigInt and Number by converting values
Lesson 131Comparison and Equality with BigIntLesson 301Strict vs Loose Equality
Lost context
By the time an error surfaces, you've lost track of which operation failed
Lesson 1244Error Handling Complexity
Lost domain meaning
When variable names like `data`, `fn`, and `x` replace meaningful business terms, you've abstracted away clarity.
Lesson 1796Recognizing Over-Abstraction in Functional Code
Lost variables
You can't inspect values from outer scopes that have already finished
Lesson 1250Debugging Nested Callbacks
Low-stakes situations
where readability wins:
Lesson 371Why Loop Performance Matters
LRU (Least Recently Used)
cache has a maximum size.
Lesson 2380Cache Invalidation and Size Limits
LTS (Long Term Support)
The stable, recommended version for most users
Lesson 2484Installing Node.js and NPM

M

Main thread → Worker
Use `worker.
Lesson 2165parentPort in Worker Scripts
Main thread receiving responses
Lesson 2149Communicating with postMessage
Maintain consistency
between related properties
Lesson 658What Are Getters and Setters?
Maintainability
Update JavaScript in one place instead of hunting through HTML
Lesson 23External JavaScript FilesLesson 1396What Are ES Modules?
Maintainability first
Public APIs, shared libraries, code worked on by large teams.
Lesson 1933Trade-offs: Speed vs Readability vs Maintainability
Maintenance and Stability
Node's test runner is stable but still maturing.
Lesson 2661Choosing the Right Test Runner
Maintenance Burden
Comments can drift from reality.
Lesson 2621Editor Support and Limitations
Maintenance burden increases
more code to test, document, and update
Lesson 1855Premature Abstraction and Speculative Generality
Maintenance nightmares
Tracking down which script owns which global is painful
Lesson 1466Global Namespace Pollution
Major Framework Ecosystems
Popular libraries like Angular, NestJS, and TypeORM were built entirely on legacy decorators.
Lesson 2105When You Might Still See Legacy Decorators
Make hooks fail gracefully
If hooks don't install (Windows issues, permission problems), developers should see clear error messages, not silent failures.
Lesson 2601Team Adoption and Best Practices
Makes changes risky
because modifying a parent affects all descendants
Lesson 1852Inheritance Hierarchies That Are Too Deep
Manipulate the webpage
using the DOM (Document Object Model), which represents the HTML structure
Lesson 17Browser Runtime: DOM and Web APIs
Manual clearing
(clicking the trash icon): Great for one-off cleanups while debugging
Lesson 1489Console.clear and Output Management
Manual deep cloning
(recursive functions or JSON tricks) is often slowest and most error-prone.
Lesson 696Choosing the Right Clone Strategy
Manual Inspection
involves searching your production bundle file for specific function names or exports you expected to disappear.
Lesson 2473Verifying Tree Shaking Results
Manual parallel firing
Create all promises immediately, then await them separately
Lesson 1307Parallel vs All: Performance Considerations
Manual tracing
You must mentally reconstruct the callback chain by reading code
Lesson 1250Debugging Nested Callbacks
Many consumers
Ten different UI elements need the same derived value
Lesson 2143Derived State and Automatic Recalculation
Map
is a built-in JavaScript data structure that stores key-value pairs, similar to objects.
Lesson 1031What is a Map and Why Use It?Lesson 1897Choosing the Right Data Structure
Map keys/values
, and even custom iterables directly into array literals.
Lesson 965Spreading Iterables into Arrays
Map then filter
Transform everything first, then remove unwanted results
Lesson 856Combining map and filter
Maps and Sets
store additional metadata for fast lookups, which means they use more memory per entry than plain arrays or objects.
Lesson 1071Collection Size and Memory ConsiderationsLesson 2151What Data Can Be Transferred?
mark phase
a systematic sweep through all reachable objects starting from the roots.
Lesson 1863The Mark PhaseLesson 1865Breaking Reference Cycles
Markdown
, **CSS**, **HTML**, and **YAML** files—no additional plugins required for these common formats.
Lesson 2583Prettier for More Than JavaScript
Marked space
Leave it alone, just remove the ticket for next time
Lesson 1864The Sweep Phase
Marks dependent nodes
as potentially stale
Lesson 2122Signal Graphs and Propagation
Matching digits
`\d+` matches one or more consecutive digits (like "42" or "12345").
Lesson 1687Combining Classes and Quantifiers
Matching hex colors
`#[0-9a-fA-F]{6}` matches exactly 6 hexadecimal characters after a hash (like "#FF5733").
Lesson 1687Combining Classes and Quantifiers
Matching variable names
`[a-zA-Z_]\w*` matches identifiers that start with a letter or underscore, followed by zero or more word characters.
Lesson 1687Combining Classes and Quantifiers
Matching words
`\w+` matches sequences of word characters (letters, digits, underscores).
Lesson 1687Combining Classes and Quantifiers
Math.ceil
When you need the smallest integer *greater than or equal to* a number (like calculating pages needed)
Lesson 136Rounding: Math.floor, Math.ceil, Math.round, Math.trunc
Math.ceil()
Always rounds **up** to the nearest integer, like rising to the ceiling above you.
Lesson 1594Math.round, Math.floor, and Math.ceil
Math.floor
When you need the largest integer *less than or equal to* a number
Lesson 136Rounding: Math.floor, Math.ceil, Math.round, Math.trunc
Math.floor()
Always rounds **down** to the nearest integer, like dropping down to the floor below you.
Lesson 1594Math.round, Math.floor, and Math.ceil
Math.LN10
Natural logarithm of 10 (~2.
Lesson 144Math Constants: PI, E, and Others
Math.LN2
Natural logarithm of 2 (~0.
Lesson 144Math Constants: PI, E, and Others
Math.LOG10E
Base-10 logarithm of *e* (~0.
Lesson 144Math Constants: PI, E, and Others
Math.LOG2E
Base-2 logarithm of *e* (~1.
Lesson 144Math Constants: PI, E, and Others
Math.round
When you want conventional "nearest integer" rounding
Lesson 136Rounding: Math.floor, Math.ceil, Math.round, Math.trunc
Math.round()
Rounds to the nearest integer.
Lesson 1594Math.round, Math.floor, and Math.ceil
Math.SQRT1_2
Square root of 1/2 (~0.
Lesson 144Math Constants: PI, E, and Others
Math.trunc
When you want to discard decimals without any rounding
Lesson 136Rounding: Math.floor, Math.ceil, Math.round, Math.trunc
MDN's JavaScript Guide
includes browser-specific sections beyond core language features
Lesson 1495Where to Learn More About Web Development
Measure actual performance
use profiling tools
Lesson 1901The Danger of Premature Optimization
Measure before and after
– Take heap snapshots before your loop and after
Lesson 1894Reproducing Leaks Systematically
Measure the suspect operation
using tools you've learned (`console.
Lesson 1930Identifying Real Performance Problems
Megamorphic
sites (5+ shapes) often fall back to slow dictionary-style lookups.
Lesson 1910Monomorphic vs Polymorphic Sites
Membership testing
(checking if a value exists) is also more efficient with Sets than arrays.
Lesson 1044What is a Set?
Memoization
is a specific form where you cache function results based on their arguments.
Lesson 1899Caching and Memoization for Repeated Work
Memory Budgets
"Heap size must stay under 50MB during typical use"
Lesson 1932Setting Performance Budgets
Memory constraints
Don't load too much data simultaneously
Lesson 1372Batching and Parallelism Limits
Memory savings
Values aren't stored in arrays; they're generated one at a time
Lesson 2061Lazy Evaluation Performance Benefits
Memory usage increases
significantly
Lesson 1866When GC Runs
Menu systems
Show the menu before checking if user wants to continue
Lesson 341When to Use Do-While vs While
Message translation
across multiple languages (Intl doesn't translate text)
Lesson 2253Deciding Between Built-ins and Libraries
MessageChannel
with dedicated ports per request, creating isolated request-response pairs without ID bookkeeping.
Lesson 2176Request-Response Patterns with PostMessage
Method/field/accessor decorator returns nothing
The original element stays as-is
Lesson 2077Returning Values from Decorators
Methods
you define inside the class automatically live on the class's prototype, so all instances share the same function references in memory—efficient and organized.
Lesson 1805Class-Based Object Creation ReviewLesson 1937What Is Optional Chaining?
Methods are bundled together
A class is typically treated as a single unit
Lesson 2471Tree Shaking Class Methods
Micro-benchmarks
designed to amplify tiny differences
Lesson 2063For-Of Loop Performance Compared to For Loop
Migration Complexity
The two decorator systems have different signatures and behaviors.
Lesson 2105When You Might Still See Legacy Decorators
Minimal file size
– minified code, stripped comments, shortened variable names
Lesson 2449Development vs Production Builds
Minutes
Get that remainder, divide by `60,000` (60 × 1000)
Lesson 1629Converting Milliseconds to Human-Readable Durations
Missed real problems
You're too busy micro-optimizing to notice the O(n²) algorithm crushing your app
Lesson 1928Premature Optimization Is the Root of All Evil
Missing the actual bottleneck
while polishing irrelevant sections
Lesson 1901The Danger of Premature Optimization
Missing understanding
Disabling rules you don't understand kicks problems down the road
Lesson 2607When to Disable Rules
Mistake #1
Thinking you can change arrow `this` with `call()`, `bind()`, or by calling it as a method.
Lesson 579Debugging 'this' in Arrow Functions
Mistake #2
Expecting `this` to be the object when an arrow is defined as a property:
Lesson 579Debugging 'this' in Arrow Functions
mixin
lets you copy methods from multiple objects into one, creating a new object that has abilities from different sources.
Lesson 729Mixins with Object.createLesson 1808Mixins: Sharing Behavior Without InheritanceLesson 1820The Mixin Pattern
Mixing logical operators
`&&` with `||` can confuse readers
Lesson 273When to Rely on Precedence vs Parentheses
Mixing lookahead and lookbehind
Lesson 1719Combining Multiple Assertions
Mixing with existing APIs
Most JavaScript functions expect Number
Lesson 1972When to Use BigInt vs Number
Mobile Devices
Using frameworks like React Native, JavaScript builds apps for iPhones and Android phones—the same code for both platforms.
Lesson 5JavaScript Beyond the Browser
Mocha
is the veteran—flexible, minimal, and unopinionated.
Lesson 2652The Test Runner Landscape
Modern best practice
Use **function expressions** inside blocks instead:
Lesson 391The Function Statement in Blocks
Modern convention
– the standard in current JavaScript
Lesson 648Methods vs Function Properties
Modern standards
Uses web-standard APIs when possible
Lesson 19Deno and Bun: Alternative Runtimes
Modern syntax
breaking in older browsers
Lesson 2452The Performance Trade-Off
Modify rule options
while keeping the rule active
Lesson 2569Overriding Rules in Extended Configs
Module identity
`===` comparisons work as expected
Lesson 1435Dynamic Import and the Cache
Module Pattern
combines everything you've learned about encapsulation: it wraps code in an IIFE (Immediately Invoked Function Expression) to create private scope, then returns an object exposing only the public methods you want users to access.
Lesson 1841The Module Pattern
Module resolution
They understand your import statements and find the right files
Lesson 2453What is a bundler and why do we need one?
module scope
variables and functions defined in one file are private by default and invisible to other files.
Lesson 1398The 'export' KeywordLesson 1447The Module Wrapper Function
Module/Revealing Module
Pick these for encapsulation in older codebases or when you need private state without classes.
Lesson 1850When to Use Each Pattern
Monitor changelogs
Read release notes for dependencies you care about
Lesson 2526Semver in Practice: Trust and Reality
monomorphic
if it always encounters objects with the same hidden class.
Lesson 1910Monomorphic vs Polymorphic SitesLesson 1913What Is Function Inlining?
monorepo
(monolithic repository) stores multiple related projects in one Git repository—think a company's design system, its React components library, and its utilities package all living together.
Lesson 2530Yarn Workspaces for MonoreposLesson 2546What Is a Monorepo?
Monotonic
always increases, never jumps backward
Lesson 1920Performance.now for High-Resolution Timing
More forgiving
JavaScript figures out many details on its own (like what type of data you're using)
Lesson 1JavaScript: A High-Level Programming Language
More maintainable
– you can swap out or reorder steps
Lesson 1777What is Function Composition?
More readable
You see exactly what's being combined in one expression
Lesson 962Concatenating Arrays with SpreadLesson 1795Point-Free in Real Codebases
Mouse move tracking
Track cursor position at controlled intervals
Lesson 2390Debounce vs Throttle: When to Use Which
much faster
than `filter()` when you only need to know *if* something exists or want the *first* match.
Lesson 884Performance Characteristics and Use CasesLesson 2532Installing and Using PNPM
Multi-word strings
(requiring quotes): `"first name"`, `"user-id"`
Lesson 590Property Names and Valid Keys
Multiline + Global (`gm`)
Find patterns across multiple lines
Lesson 1728Combining Multiple Flags
Multiple argument handling
Robust caching of all passed arguments
Lesson 2392Using Lodash or Underscore Implementations
Multiple dependencies
`totalPrice` might depend on `items`, `taxRate`, and `discountCode`
Lesson 2143Derived State and Automatic Recalculation
Multiple event sources
When combining user clicks, WebSocket messages, and timer events, reactive operators handle the complexity better than nested callbacks or promise chains.
Lesson 2139Identifying Problems Suited for Reactive Patterns
Multiple locales matter
Your app serves users across different languages where list formatting rules vary (English uses commas, some languages use semicolons or different conjunctions)
Lesson 2246When to Use ListFormat and DisplayNames
Multiple operations can overlap
Fetching data from several sources at once
Lesson 1180When to Choose Sync vs Async
Multiple references
All variables pointing to the same array see mutations instantly
Lesson 810What 'Mutating' Means for Arrays
Multiple statements
If either branch needs to do more than return a value, if/else is cleaner.
Lesson 233Ternary Pitfalls and Readability
Multiple statements to execute
Lesson 229When to Use Ternary vs If/Else
Multiplication/Division/Remainder
`*`, `/`, `%`
Lesson 266Precedence Levels Overview
Mutating methods
modify the original array directly.
Lesson 825Understanding Mutating vs Non-Mutating Methods

N

Name collisions
You might overwrite existing global properties
Lesson 1465Implicit Global Access
Named arguments
`{ premium: true }` is clearer than `true` in the 4th position
Lesson 672Passing Configuration ObjectsLesson 1513Argument Parsing Libraries: minimist
Named callback
that references the object:
Lesson 1229The 'this' Problem in Callbacks
Namespace imports
let you import *everything* at once, grouped under a single object name.
Lesson 1416Namespace Imports
Namespace pollution
Without modules, large applications had variables stomping on each other
Lesson 1396What Are ES Modules?
Namespacing
Best when you want readable, discoverable property access
Lesson 1822Avoiding Mixin Name Collisions
Namespacing with colons
Group related tasks like `build:dev` and `build:prod` for clarity.
Lesson 2539Scripts: Automating Tasks
Naming conflicts
Common names like `data`, `config`, or `utils` collide
Lesson 1466Global Namespace Pollution
Naming quality
Is `processData()` descriptive enough for this context?
Lesson 2603Automation vs. Human Judgment
NaN breaks all comparisons
Any comparison involving `NaN` returns `false`, even `NaN === NaN`:
Lesson 208Comparing Numbers
NaN's unique inequality
`NaN` is the only JavaScript value that doesn't equal itself (`NaN !
Lesson 2410Edge Cases: Null, Undefined, and NaN
Narrow
Ideal for compact dashboards, charts, or mobile interfaces where every character counts
Lesson 1658Style Options: Long, Short, and NarrowLesson 2239ListFormat Styles: Long, Short, and Narrow
Natural iteration
Guaranteed insertion order with simple `.
Lesson 1065Object vs Map: When Objects Fall Short
Natural reading
The code reads like plain English
Lesson 352For...of with Strings
Needs access
to private fields
Lesson 1987Private Methods
Negative Lookahead (`(?!...)`)
Checks that a pattern *doesn't* follow
Lesson 1711What Are Lookahead and Lookbehind?
Negative Lookbehind (`(?<!...)`)
Checks that a pattern *doesn't* precede
Lesson 1711What Are Lookahead and Lookbehind?
Nested objects needing independence
→ `structuredClone`
Lesson 696Choosing the Right Clone Strategy
Nested ternaries
While technically valid, deeply nested ternaries become nearly unreadable:
Lesson 233Ternary Pitfalls and Readability
Nested translations
or complex message structures
Lesson 2253Deciding Between Built-ins and Libraries
Nesting
(callback-hell-style):
Lesson 1295Chaining vs Nesting
Nesting exceeds 3 levels
(rightward drift is painful)
Lesson 1262Balancing Pragmatism and Refactoring
Network protocols
HTTP headers, WebSocket frames, and API responses often use UTF-8 encoded bytes
Lesson 2343Why TextEncoder and TextDecoder Exist
Network requests
Fetching data from a server might take seconds
Lesson 1174Why JavaScript Needs Asynchronous Code
Networking
– creating web servers, making HTTP requests
Lesson 18Node.js Runtime: Server-Side JavaScript
Never modifies `package-lock.json`
(read-only operation)
Lesson 2494npm ci for Reproducible Installs
Never throw synchronously
inside stream methods—always pass errors to the callback.
Lesson 1570Error Handling in Duplex and Transform
new
iterator with its own `index`, so both loops work independently.
Lesson 2014Reusable vs Single-Use IteratorsLesson 2161Structured Clone for Message Passing
New Binding
When a function is called with the `new` keyword
Lesson 538The Four Binding Rules Preview
New event types
emitted by an EventEmitter
Lesson 2520MINOR: Backward-Compatible Features
New exported modules
in your package
Lesson 2520MINOR: Backward-Compatible Features
New functions or methods
that don't alter existing ones
Lesson 2520MINOR: Backward-Compatible Features
New objects
created between snapshots
Lesson 1887Comparing Two Snapshots
New optional parameters
with sensible defaults
Lesson 2520MINOR: Backward-Compatible Features
Next.js
use SWC as their compilation engine.
Lesson 2462SWC and modern bundler foundations
Nitro
) is Apple's JavaScript engine that runs code in Safari and any browser built with WebKit on macOS and iOS.
Lesson 12JavaScriptCore: Safari's Engine
No `new` keyword required
just call the function
Lesson 668What Are Factory Functions?
No arguments
The callback receives nothing—it can't access resolve values or rejection reasons
Lesson 1282The .finally() MethodLesson 1327Finally for Cleanup ActionsLesson 1601Math.random for Random Number Generation
No built-in size property
You need `Object.
Lesson 1031What is a Map and Why Use It?
No centralized recovery
Each error must be handled independently
Lesson 1244Error Handling Complexity
No closure access
Unlike normal functions, `Function` constructor functions don't capture their surrounding scope — they only see global scope.
Lesson 387Function Constructor (Rarely Used)
No Compile-Time Enforcement
JSDoc only helps in your editor.
Lesson 2621Editor Support and Limitations
No confusion about `this`
you explicitly create and return objects
Lesson 668What Are Factory Functions?
No context
The error appears isolated, disconnected from the larger operation
Lesson 1250Debugging Nested Callbacks
No development warnings
– runtime checks removed to reduce bundle size
Lesson 2449Development vs Production Builds
No explosion of parameters
One function parameter handles infinite variations
Lesson 437Functions as Configuration
No Functions or Methods
Lesson 678JSON Syntax Rules
No gender/case handling
Many languages inflect words based on context (subject gender, grammatical case)
Lesson 2251Limitations of Built-ins: No Message Translation
No inherited properties
Maps are clean; they only contain what you put in them
Lesson 1031What is a Map and Why Use It?
No interpolation logic
Inserting dynamic values into translated templates while respecting word order differences across languages
Lesson 2251Limitations of Built-ins: No Message Translation
No message catalog
`Intl` doesn't store translations like "Hello" → "Bonjour"
Lesson 2251Limitations of Built-ins: No Message Translation
No mixing types
This will throw an error:
Lesson 1969BigInt Arithmetic Operations
No multiplexing
each file tied up a connection until fully downloaded
Lesson 2443The Module Problem in Browsers
No native syntax support
Languages with monads often have special syntax (like Haskell's `do` notation).
Lesson 1799Functor/Monad Pattern Mismatch in JS
No ordering requirements
Operations can complete in any order
Lesson 1368Choosing Between Sequential and Parallel
No parentheses
Unlike functions, class declarations don't have `()` after the name
Lesson 745Declaring a Class with the class Keyword
No pollution
Before modern features, IIFEs were the primary way to avoid cluttering the global scope with temporary variables.
Lesson 386Immediately Invoked Function Expressions (IIFE)
No return needed
The constructor automatically returns the new instance (just like constructor functions with `new`)
Lesson 747The Constructor Method
No return statement
The instance is returned (normal behavior).
Lesson 766Return Values from Constructors
No text translation needed
Your UI labels are fixed in one language, or you have only a handful of static strings
Lesson 2247Identifying Simple i18n Requirements
No, mostly just storing/iterating
→ `Array` or `Object` may suffice
Lesson 1072Decision Framework: Choosing the Right Collection
No, or need iteration
→ Stick with strong collections
Lesson 1072Decision Framework: Choosing the Right Collection
Node built-in
Quick checks, no setup
Lesson 2717Generating Coverage Reports
Node Test Runner
(built into Node.
Lesson 2652The Test Runner Landscape
Node.js 14.8.0
(stable in v16+)
Lesson 1380Browser vs Node.js Support
Node.js 14.x
(partial support in later patches)
Lesson 1963Browser and Node Support Considerations
Node.js 18
, `fetch` became a **global built-in**, meaning you can use it just like you would in the browser— no imports required.
Lesson 2265Fetch in Node.js
Node.js Readable streams
(traditional `stream.
Lesson 2027Built-in Async Iterables
Node.js runtime
gives you `fs` (file system), `http` (servers), `process`
Lesson 20Why Runtime Differences Matter
non-deterministic
either could run first depending on system performance.
Lesson 1207setTimeout vs setImmediate (Node.js)Lesson 1866When GC Runs
Non-deterministic installs
Before lockfiles existed (npm added them later in v5), the same `package.
Lesson 2527Why Alternative Package Managers Exist
Non-empty strings
`"hello"`, `"0"`, `" "` (even a space!
Lesson 195Truthy Values: What Evaluates to True
Non-enumerable by default
they won't show up in `for.
Lesson 622Computed Keys with Symbols
Non-flagged arguments
(positional) go into the `_` array
Lesson 1513Argument Parsing Libraries: minimist
Non-ISO or date-time strings
without explicit timezone (like `"2024-03-15 14:30"`) are parsed as **local time**
Lesson 1618Parsing Ambiguity with Local vs UTC
Non-mutating methods
leave the original array untouched and return a new array or value instead.
Lesson 825Understanding Mutating vs Non-Mutating Methods
non-strict mode
, older engines might hoist it to the entire function or global scope, making it accessible outside the block.
Lesson 391The Function Statement in BlocksLesson 425Hoisting in Block Scope
Non-zero
(typically 1) means "something went wrong" (error)
Lesson 1500Process.exit() and Exit Codes
Notation
How should the number be represented?
Lesson 2205Grouping and Notation Options
Notice
The default import (`fetchData`) comes first, without braces.
Lesson 1413Mixing Named and Default Exports
Notifications API
enables desktop-style alerts even when your page isn't visible.
Lesson 1494Web APIs Beyond the DOM
Notify
alert all observers when state changes
Lesson 2106What Is the Observer Pattern?
NPM (Node Package Manager)
is a package manager for JavaScript that solves this problem.
Lesson 2483What is NPM and Why It Exists
NPX Execution
Run the tool temporarily without installing it globally using `npx package-name`.
Lesson 2510NPX vs Global Install
Null check
Handle `null` explicitly (since `typeof null === "object"`)
Lesson 2406Recursive Deep Equality Algorithm
Null's typeof lie
Despite being a primitive, `typeof null` returns `"object"`.
Lesson 2410Edge Cases: Null, Undefined, and NaN
Nullish values
are *only* `null` and `undefined` — values that represent the absence of a value.
Lesson 1948Nullish vs Falsy Values
Number.isFinite
only accepts numbers:
Lesson 106Number.isFinite vs Global isFinite
Number.MAX_SAFE_INTEGER
is the largest integer JavaScript can represent with absolute precision: **9,007,199,254,740,991** (about 9 quadrillion).
Lesson 118Number.MAX_SAFE_INTEGER and MIN_SAFE_INTEGER
Number.MAX_VALUE
represents the largest positive number JavaScript can handle—approximately `1.
Lesson 109Number Constants: MIN_VALUE, MAX_VALUE
Number.MIN_SAFE_INTEGER
is the smallest: **-9,007,199,254,740,991** (the negative equivalent).
Lesson 118Number.MAX_SAFE_INTEGER and MIN_SAFE_INTEGER
Number.MIN_VALUE
is trickier: it's the *smallest positive number* JavaScript can represent—approximately `5e-324`.
Lesson 109Number Constants: MIN_VALUE, MAX_VALUE
NumberFormat
Handles decimal separators, thousand separators, and currency symbols
Lesson 1643What Intl Solves: Beyond Naive Formatting
Numeric data
Working primarily with typed arrays (Int32Array, Float64Array, etc.
Lesson 2179PostMessage vs Shared Memory: When to Use Each
Numeric overflow
(exceeding `Number.
Lesson 121Infinity and -Infinity

O

O(1) time complexity
constant time, regardless of size.
Lesson 1068Set Performance: Membership Tests at Scale
O(n) time complexity
as your array grows, worst-case search time grows proportionally.
Lesson 1068Set Performance: Membership Tests at ScaleLesson 1997Performance Characteristics of findLast()
Object handling
Compare key counts, ensure all keys match, then recurse on each property value
Lesson 2406Recursive Deep Equality Algorithm
Object Literals
– Methods or properties inside plain object literals cannot use decorators.
Lesson 2086When Decorators Cannot Be Used
Object URL
is a special temporary URL (starting with `blob:`) that points to that in-memory data.
Lesson 2369Creating Object URLs
Object.create()
is slightly slower because it involves more setup steps—especially when you pass a second parameter defining properties.
Lesson 730Performance Considerations
Objects and arrays
including deeply nested ones
Lesson 2004What structuredClone Can and Cannot Clone
Objects with prototypes
(class instances): Only plain data survives
Lesson 2151What Data Can Be Transferred?
Obscures behavior
since you must trace through multiple classes to understand what a method does
Lesson 1852Inheritance Hierarchies That Are Too Deep
Observable
is like a stream that can emit multiple values over time, and it gives you fine-grained control over when and how that stream operates.
Lesson 2128Observables vs Promises
Observables are push-based
they actively push values to subscribers whenever new data arrives.
Lesson 2124Signals vs Observables
Observe invocations
for logging, metrics, or debugging
Lesson 2072Method Decorators
Observer/Pub-Sub
Apply when you have one-to-many relationships where changes in one object should notify multiple dependents (UI updates, event systems).
Lesson 1850When to Use Each Pattern
Octal (`0o` prefix)
Uses only digits 0-7:
Lesson 101Number Literals: Decimal, Hex, Octal, Binary
Official spec
Part of the JavaScript language itself
Lesson 1449When to Use CommonJS in Modern Projects
Offline development
Local caches or proxies for network-restricted environments
Lesson 2496The NPM Registry and Alternatives
Old approach
Decorators received the class/method *descriptor* directly and could mutate it.
Lesson 2068The Stage 3 Decorators Proposal
Older npm packages
that haven't been updated
Lesson 1449When to Use CommonJS in Modern Projects
Older TypeScript Projects
Many applications were built between 2015 and 2022 when only experimental decorators existed.
Lesson 2105When You Might Still See Legacy Decorators
On entry
when entering a new state
Lesson 2429Adding Side Effects and Actions
On-demand computation
Expensive operations run only when values are needed, not before.
Lesson 1119What Makes a Sequence Lazy?
Onboarding is faster
because there's no "house style guide" to memorize—Prettier *is* the style
Lesson 2584The Philosophy of Opinionated Formatting
Onboarding speeds up
New team members learn one style, not five
Lesson 2604Consistent Style vs. Personal Preference
one after another
(where each step might depend on the previous), you could nest them — or you could use a control flow pattern that keeps your code flat and readable.
Lesson 1258The Async.series PatternLesson 1276Chaining .then() Calls
One parameter
Skip the parentheses
Lesson 392Arrow Function Syntax Basics
One per class
A class can only have *one* constructor method
Lesson 747The Constructor Method
One per module
You can only have one `export default` per file
Lesson 1411Default Export Syntax
One-time use
Once iterated, the iterator is exhausted
Lesson 162matchAll(): Iterating Over All Matches
One-use abstractions
Creating a generic helper function used exactly once is over-engineering.
Lesson 1796Recognizing Over-Abstraction in Functional Code
Only enumerable properties
By default, properties you add to an object are enumerable.
Lesson 625Object.keys() for Enumerable Properties
Only for classic workers
Module workers use standard `import` syntax instead
Lesson 2155Importing Scripts in Workers
Only synchronous code
is allowed—no async operations, Promises, or callbacks
Lesson 1504Process Event: 'exit'
Open/Closed Principle
Extend behavior without changing existing code
Lesson 1824The Decorator Pattern for Behavior Layering
Operating system interaction
– accessing environment variables, system info
Lesson 18Node.js Runtime: Server-Side JavaScript
Operations are independent
No operation needs another's result
Lesson 1368Choosing Between Sequential and Parallel
operator precedence
a built-in set of rules that determines the order of operations, just like the math rules you learned in school (remember "Please Excuse My Dear Aunt Sally"?
Lesson 265What is Operator Precedence?Lesson 267Multiplication Before Addition
Optimize hot paths only
If profiling shows composition is a bottleneck (rare), inline the logic manually in that specific spot.
Lesson 1786Performance Considerations
Optimize only what matters
target measured issues
Lesson 1901The Danger of Premature Optimization
Optimized performance
– aggressive optimizations that take longer to compute
Lesson 2449Development vs Production Builds
Optimizing load order
ensuring dependencies load before dependents
Lesson 2446Dependency Resolution
Optional parameters
wrap the type in square brackets or use explicit syntax:
Lesson 2615Union Types and Optional Parameters
OptionalDependencies
are packages that enhance functionality but aren't required.
Lesson 2541PeerDependencies and Optional Dependencies
Order doesn't matter much
– Sets maintain insertion order but aren't indexed
Lesson 1066Array vs Set: Handling Unique Values
Order is critical
When the next line absolutely cannot run until the current operation finishes
Lesson 1180When to Choose Sync vs Async
Order is not guaranteed
While most engines iterate arrays in order, the JavaScript specification doesn't guarantee it for `for.
Lesson 356For...in with Arrays: Why to Avoid
Order isn't guaranteed historically
Though modern engines maintain insertion order, it wasn't always reliable
Lesson 1031What is a Map and Why Use It?
Ordinal plurals
express order or rank: "1st place," "2nd place," "3rd place"
Lesson 1661Ordinal vs Cardinal PluralsLesson 2231Cardinal vs Ordinal Plurals
Organization
Keep HTML and JavaScript separate, making both easier to read
Lesson 23External JavaScript Files
Organize
multiple related functions in data structures (coming soon!
Lesson 428Assigning Functions to Variables
original
function, not on an already-bound version.
Lesson 566Chaining bind() CallsLesson 2475What Are Source Maps?
Original file names appear
in the Sources panel instead of `bundle.
Lesson 2480Using Source Maps in Browser DevTools
Other formats
(like `"March 15, 2024"` or `"2024/03/15"`) are interpreted as **local timezone**
Lesson 1635The Date Constructor's Timezone Trap
Outdated extension
– Update to the latest version; older ones may not support newer config formats
Lesson 2592Troubleshooting Editor Integration Issues
Outer layers (bread)
Impure operations — I/O, state changes, network calls
Lesson 1751When Impurity Is Unavoidable
Outer scope
(the `outer` function) — **found!
Lesson 487Scope Chain Fundamentals
Output panel
in your editor (often View → Output, then select ESLint or Prettier from the dropdown).
Lesson 2592Troubleshooting Editor Integration Issues
Over-escaping
Remember that only special characters like `.
Lesson 1676Common Mistakes and When Regex Is Overkill
Overhead per request
headers re-sent every time
Lesson 2443The Module Problem in Browsers
Overly greedy dot matches
can capture far more than intended:
Lesson 1688Common Quantifier Pitfalls
Overwrites
snapshot files with new output
Lesson 2709When Snapshots Are Updated

P

Pad string
(optional): the character(s) to fill with (defaults to a space)
Lesson 177Padding Strings with padStart and padEnd
Page Visibility API
to detect when your tab becomes hidden and pause timers accordingly
Lesson 1210setTimeout in Background Tabs
Parallel execution
If tasks are independent and can run simultaneously, use `Promise.
Lesson 2037When to Prefer For-Await-Of
Parallel states
for modeling concurrent behavior
Lesson 2433FSM Libraries: XState Overview
Parallel validations
where you need all validation results
Lesson 1317allSettled for Independent Operations
Parameter Decorators
– Unlike TypeScript's experimental decorators, the Stage 3 proposal does *not* support decorating individual function parameters.
Lesson 2086When Decorators Cannot Be UsedLesson 2103Property and Parameter Decorators in Legacy Syntax
Parameter hints
See expected argument types and descriptions as you call functions
Lesson 2648Editor Experience with JSDoc
Parameter order
Legacy mirrors Object.
Lesson 2102Legacy Class and Method Decorators
Parent prototype → Object.prototype
Continues the standard chain
Lesson 775The Prototype Chain with Extends
Parentheses `()`
Will eventually hold parameters (coming in future lessons)
Lesson 379Function Declaration Syntax
Parse Imports
It reads the file and finds all `import` or `require()` statements.
Lesson 2446Dependency Resolution
Parsers
processing thousands of tokens
Lesson 1903When Micro-Optimizations Do Matter
Parses your code
into an Abstract Syntax Tree (AST)—a structured representation of your code's logic
Lesson 2602What Linters Actually Do
partial application
you're applying *part* of the arguments now, leaving the rest for later.
Lesson 563Partial Application with bind()Lesson 1764What Is Currying?Lesson 1768Currying vs Partial Application
Partially covered branches
If statements where only one path was tested
Lesson 2721Using Coverage to Find Gaps
PascalCase
(capitalize the first letter) to signal *intent*:
Lesson 733Constructor Functions vs Regular Functions
Pass functions
to other parts of your code
Lesson 428Assigning Functions to Variables
Passes a value back
to wherever the function was called
Lesson 418What Return Statements Do
Passing objects to functions
that might mutate them
Lesson 689Why Object Cloning Matters
PATCH
(partial updates), **HEAD** (like GET but only retrieves headers), or **OPTIONS** (asks what methods are allowed).
Lesson 2258Fetch and HTTP MethodsLesson 2268Request Methods and HTTP VerbsLesson 2484Installing Node.js and NPMLesson 2518What is Semantic Versioning?
Path
The file name or path (string)
Lesson 1520Writing Files with fs.writeFile()
Paused Mode (Pull)
The stream waits passively.
Lesson 1553Paused vs Flowing Mode
pauses
at the await point, allowing its Promise to settle before continuing.
Lesson 1377Module Loading and Execution OrderLesson 1579Pipe's Automatic Backpressure
PeerDependencies
are packages your library expects the *host application* to provide, not packages you install yourself.
Lesson 2541PeerDependencies and Optional Dependencies
Pending callbacks
(I/O callbacks deferred from previous cycle)
Lesson 1218Event Loop in Node vs Browser
Perceived
problems show up as vague complaints without corresponding data spikes.
Lesson 1930Identifying Real Performance Problems
Perception of slowness
Users assume your app is broken
Lesson 2191Main Thread Blocking and User Experience
Perform the action
that you suspect might leak memory
Lesson 1887Comparing Two Snapshots
Performance benefit
The browser or runtime doesn't re-parse, re-evaluate, or re-execute module code unnecessarily.
Lesson 1407Modules Are Singletons
Performance benefits
Streams enable *pipelining*.
Lesson 1549Why Use Streams?
Performance bottlenecks
npm installed packages sequentially and made redundant network requests, causing slow install times—sometimes taking minutes for large projects.
Lesson 2527Why Alternative Package Managers Exist
Performance critical
Avoiding copy overhead is essential
Lesson 2179PostMessage vs Shared Memory: When to Use Each
Performance gains
Process huge datasets without loading everything into memory.
Lesson 1119What Makes a Sequence Lazy?
Performance Impact
Modern JavaScript engines optimize property access based on an object's prototype chain.
Lesson 708Changing an Object's Prototype
Performance improvements
with no API changes
Lesson 2521PATCH: Bug Fixes and Safe Updates
Performance is critical
Encoding/decoding Base64 takes CPU time
Lesson 2360Base64 Overhead and When to Avoid It
Performance matters
Faster total execution time
Lesson 1368Choosing Between Sequential and Parallel
Performance Monitor
is a live dashboard in Chrome DevTools that shows real-time metrics while your application runs.
Lesson 1893Performance Monitor for Memory Trends
Performance Observer API
flips this around: it *pushes* performance entries to you as they happen, letting you collect timing data without constantly checking or blocking the main thread.
Lesson 1922The Performance Observer APILesson 1926Real User Monitoring Metrics
Performance optimizations
Years of refinement for speed and memory efficiency
Lesson 2403Library Solutions: Lodash cloneDeep
Performance Requirements
Does your test suite run hundreds or thousands of tests?
Lesson 2661Choosing the Right Test Runner
Performance trade-offs
Is this readable but slow approach acceptable here?
Lesson 2603Automation vs. Human Judgment
Performance-critical applications
(games, real-time processing)
Lesson 374For vs ForEach vs For...of Performance
Performance-Critical Code
Manual iterators avoid the overhead of generator function state machines, which matters in tight loops or high-frequency operations.
Lesson 1095When Custom Iterators Beat GeneratorsLesson 1972When to Use BigInt vs Number
Performance-critical loops
When processing large datasets or running tight loops thousands of times, the overhead of creating new arrays on each iteration adds up.
Lesson 914When to Mutate: Performance Trade-OffsLesson 2037When to Prefer For-Await-Of
Permission denied
→ Error callback runs with code `1`
Lesson 1476Geolocation API
Permission granted
→ Success callback runs with position data
Lesson 1476Geolocation API
Pin critical dependencies
Use exact versions (`1.
Lesson 2526Semver in Practice: Trust and Reality
Pipeline transformations
Chaining lazy operations (map, filter, take) on iterators processes one item at a time through the entire pipeline.
Lesson 2065When Iterators Beat Arrays: Infinite and Large Sequences
Piping
is a mechanism that connects a readable stream directly to a writable stream, automatically handling the flow of data between them.
Lesson 1572What is Piping?Lesson 1573Basic Pipe Syntax
Place callbacks
in the correct queue (Promise `.
Lesson 1220Mental Model for Debugging Async
Plain objects and arrays
`{ name: "Alice" }`, `[1, 2, 3]`
Lesson 2151What Data Can Be Transferred?
Plain objects have limitations
Lesson 1031What is a Map and Why Use It?
Plain properties
are perfect for simple data storage—when you just need to hold a value without any special behavior.
Lesson 667When to Use Getters/Setters vs Plain Properties
Plain text
is the simplest option:
Lesson 2270Request Body and Body Types
Plain text body
→ `"Content-Type": "text/plain"`
Lesson 2289Content-Type Header and Body Matching
Plug'n'Play (PnP)
instead of extracting packages into `node_modules`, it keeps dependencies as `.
Lesson 2528Yarn Classic vs Yarn Berry (v2+)
Plugin systems
Let modules register hooks to run later
Lesson 519Callback Queues
Point-free taken too far
Eliminating all parameter names can make code unreadable when intermediate steps aren't obvious.
Lesson 1796Recognizing Over-Abstraction in Functional Code
Polish
uses different forms for 1, 2-4, and 5+ items
Lesson 2228Understanding Pluralization Across Languages
Poorly structured code
Needing to disable `max-lines` or `complexity` repeatedly suggests functions doing too much
Lesson 2607When to Disable Rules
position
to start searching from (for `startsWith()`) or to treat as the end (for `endsWith()`):
Lesson 157startsWith() and endsWith()Lesson 158indexOf(): Finding the First OccurrenceLesson 1692Word Boundaries: \b
Position unavailable
→ Error callback runs with code `2`
Lesson 1476Geolocation API
Positive Lookahead (`(?=...)`)
Checks that a pattern *does* follow
Lesson 1711What Are Lookahead and Lookbehind?
Positive lookbehind
lets you check what comes *before* your pattern without "consuming" that text.
Lesson 1718Matching Words Preceded by Something
Positive Lookbehind (`(?<=...)`)
Checks that a pattern *does* precede
Lesson 1711What Are Lookahead and Lookbehind?
POST
– Create new data (like adding a new book to the library)
Lesson 2268Request Methods and HTTP Verbs
Postfix
(after the variable): `x++` or `x--`
Lesson 239Increment and Decrement Operators
PostMessage
Copies data between contexts (structured cloning or transferring)
Lesson 2179PostMessage vs Shared Memory: When to Use Each
Potential blocking
Long-running functions freeze everything else until they finish
Lesson 1187Single-Threaded Execution
Powerful mocking
Create mock functions, spy on existing functions, and mock entire modules without third-party tools.
Lesson 2655Jest: The All-in-One Runner
Powers all iOS browsers
Due to Apple's App Store rules, even Chrome and Firefox on iOS actually use JavaScriptCore under the hood, not their own engines
Lesson 12JavaScriptCore: Safari's Engine
Practical mismatch
JavaScript's strength is pragmatic, imperative-functional hybrids.
Lesson 1799Functor/Monad Pattern Mismatch in JS
Pre and post hooks
`prebuild` runs automatically before `build`, `posttest` after `test`.
Lesson 2539Scripts: Automating Tasks
Preconditions aren't met
required data is missing or malformed
Lesson 1140The throw Statement
Predictable execution order
You always know the exact sequence of operations within synchronous code
Lesson 1187Single-Threaded Execution
Predictable Memory
A `Float64Array` with 1000 elements always uses exactly 8,000 bytes.
Lesson 2330Performance Characteristics
Prefix
(before the variable): `++x` or `--x`
Lesson 239Increment and Decrement Operators
Preserve DRY principles
(Don't Repeat Yourself) when the same pattern appears everywhere
Lesson 2067What Decorators Are and Why They Exist
Preserving context
You need to lock in `this` before the function gets called in an unpredictable context
Lesson 557Why Manual 'this' Binding Exists
Preserving state history
(undo/redo systems, snapshots)
Lesson 2395Why Deep Clone?
Prettier - Code formatter
extension (by Prettier)
Lesson 2581Format-on-Save in Your Editor
Previewing changes
without committing them
Lesson 689Why Object Cloning Matters
primitive values
(numbers, strings, booleans), each array position gets its own independent copy.
Lesson 893Fill Gotcha: Reference vs Primitive ValuesLesson 2004What structuredClone Can and Cannot Clone
Prioritize intelligently
Not all gaps are equal.
Lesson 2721Using Coverage to Find Gaps
Privacy
Use closures to create truly private data
Lesson 1821Functional Mixins
Private fields
(modern): Using `#` syntax in classes (ES2022)
Lesson 1827What Encapsulation Means in JavaScript
private methods
keep internal helper logic hidden from code outside the class.
Lesson 791Private MethodsLesson 1987Private Methods
Private Methods Pattern
uses closures to create helper functions that exist only within the factory function's scope.
Lesson 514Private Methods Pattern
Private packages
Your company's internal code shouldn't be public
Lesson 2496The NPM Registry and Alternatives
private scope
and providing explicit `import` and `export` syntax to share code between files.
Lesson 1396What Are ES Modules?Lesson 1397The Module Scope
Problem
Type coercion can cause collisions.
Lesson 2375Cache Key Generation Strategies
Process management
– running scripts, handling command-line input
Lesson 18Node.js Runtime: Server-Side JavaScriptLesson 1501Process.pid and Process.ppid
Process microtasks
Run *all* microtasks before moving to the next task
Lesson 1219Tracing Execution with a Diagram
Production mode
Vite switches gears completely and uses Rollup under the hood to create optimized, bundled assets with code splitting, tree shaking, and minification.
Lesson 2459Vite: Development server meets bundler
Production monitoring
Log unhandled rejections to error tracking services
Lesson 1506Process Event: 'unhandledRejection'
Production optimization
They minify, compress, and optimize your final output
Lesson 2453What is a bundler and why do we need one?
Production with forgotten logs
Users with DevTools open experience memory bloat
Lesson 1878Console.log in Production Code
Professional polish
You're building a consumer-facing product where natural language matters
Lesson 2246When to Use ListFormat and DisplayNames
Profile first
using DevTools Memory Profiler or Performance Monitor
Lesson 1905The 80/20 Rule in Performance
Profiling
means measuring where your code actually spends its time, so you know what's worth fixing.
Lesson 378Profiling Before Optimizing Loops
Programmatic clearing
Useful when you want to isolate specific output, create visual boundaries between operations, or automatically reset logs in long-running processes
Lesson 1489Console.clear and Output Management
Progress tracking
Read chunks as they arrive and update a progress bar
Lesson 2291Accessing the ReadableStream
Progressive enhancement
means building your application so it *works* without workers but *benefits* from them when available.
Lesson 2197Progressive Enhancement with Workers
Project config files
– Shared files committed to Git (`.
Lesson 2588Editor Settings vs Project Config
Project Type
matters significantly.
Lesson 2465Choosing a bundler for your project
Project Type and Size
Small scripts or libraries might thrive with Node's built-in runner for its zero-dependency simplicity.
Lesson 2661Choosing the Right Test Runner
Projects maintaining backward compatibility
with Node.
Lesson 1449When to Use CommonJS in Modern Projects
Promise chaining
is the technique of calling `.
Lesson 1288What Promise Chaining Is
Promise chains
make the asynchronous nature visible at every step.
Lesson 1338Async Functions vs Promise Chains
Promise Constructor Anti-Pattern
happens when you wrap an operation that *already returns a promise* inside a new `Promise()` constructor.
Lesson 1273Promise Constructor Anti-Pattern
Promise.all
Use when you need *every* promise to succeed.
Lesson 1316Comparing any, race, all, and allSettled
Promise.allSettled
Use when you need to *try everything* and see all outcomes, regardless of success or failure.
Lesson 1316Comparing any, race, all, and allSettled
Promise.any
Use when you need *at least one* success, and you don't care which one.
Lesson 1316Comparing any, race, all, and allSettled
Promise.race
Use when you only care about the *first* result, success or failure.
Lesson 1316Comparing any, race, all, and allSettled
Promises-based
Returns promises for modern async/await patterns
Lesson 1517FS Module Overview: Sync vs Async vs Promises API
Promisifying
means wrapping these callback-based functions in a Promise, transforming them into cleaner, chainable code that works beautifully with `async/await`.
Lesson 1260Promisifying Callback-Based APIs
Proper `this` binding
Automatic context preservation
Lesson 2392Using Lodash or Underscore Implementations
properties
on the `Math` object with full precision, so you don't have to memorize or estimate them.
Lesson 144Math Constants: PI, E, and OthersLesson 789Static vs Instance: When to Use EachLesson 1937What Is Optional Chaining?
property
, not a method—no parentheses needed like `size()`.
Lesson 1038Map Size PropertyLesson 1048Set Size and Clearing
Property descriptors
getters, setters, configurability
Lesson 2004What structuredClone Can and Cannot Clone
Protect
internal state from invalid changes
Lesson 1834Getters and Setters for Controlled Access
Prototype chains
Maintains proper inheritance
Lesson 2403Library Solutions: Lodash cloneDeep
Prototype pollution
Objects inherit properties from `Object.
Lesson 1065Object vs Map: When Objects Fall Short
Prototype pollution risks
Objects inherit properties from `Object.
Lesson 1031What is a Map and Why Use It?
Providing direct, fast access
to memory
Lesson 2319What Are Typed Arrays?
Public APIs or libraries
When your code will be used by others who might accidentally (or intentionally) access internal state
Lesson 1991When to Use Private Fields
Pull
You get a notification saying "new article available" — you visit the website to read it
Lesson 2111Push vs Pull Models
Pull Model
The subject only sends a notification (or a reference to itself).
Lesson 2111Push vs Pull Models
pure function
is like a reliable vending machine: you put in the same coins, you always get the same snack, and the machine doesn't randomly redecorate your office while you wait.
Lesson 1741What Makes a Function PureLesson 2381Memoization Gotchas with Impure Functions
Pure functions
(same input always produces same output)
Lesson 2378When Memoization Helps Performance
Pure methods
(same inputs always produce same output)
Lesson 2089Memoization Decorators
Push
The full article arrives in your inbox
Lesson 2111Push vs Pull Models
Push Model
The subject sends complete data to observers when notifying them.
Lesson 2111Push vs Pull Models
PUT
– Replace existing data completely (like rewriting an entire book)
Lesson 2268Request Methods and HTTP Verbs

Q

Queue
actions to execute later
Lesson 1846The Command Pattern
Queues a microtask
to resume the function after the awaited promise settles
Lesson 1351The Implicit Microtask Queue
Quoted property names
can contain almost anything: spaces, hyphens, special characters, or reserved words:
Lesson 590Property Names and Valid Keys

R

radix
(optional, but recommended) specifies the number system — `10` for decimal, `16` for hexadecimal, `2` for binary:
Lesson 104Number.parseInt and Number.parseFloatLesson 1791The parseInt Gotcha
Raising minimum requirements
Requiring a newer Node.
Lesson 2519MAJOR: Breaking Changes
Random access needed
Arrays let you jump to any index; lazy sequences only move forward
Lesson 1127When to Choose Lazy vs. Eager
Rapid prototyping
When experimenting, JSDoc won't slow you down with compiler errors blocking execution—you get editor hints without build friction.
Lesson 2643Assessing Project Complexity and Team Size
Raw
It stores only bytes, with no inherent type or structure
Lesson 2332What is an ArrayBuffer?
Re-declaration allowed
You can accidentally declare the same variable twice with `var`, and JavaScript won't complain — it just overwrites silently.
Lesson 66Declaring Variables with var
Re-exporting
means importing something from one module and immediately exporting it from your current module.
Lesson 1414Export Lists and Re-exporting
Re-throw intermediate errors
that you can't fully resolve:
Lesson 1329Error Handling Best Practices in Chains
reachability
if there's no way to access a piece of data from your currently running code — no variable references it, no object property points to it — then it's considered "unreachable" and eligible for garbage collection.
Lesson 1860What is Garbage Collection?Lesson 1861Reachability: The Core ConceptLesson 1869What Developers Can't Control
React
Forgetting cleanup in `useEffect` hooks or not canceling subscriptions in class component `componentWillUnmount`.
Lesson 1881Memory Leak Patterns in Frameworks
Reactive patterns
(observables, streams) focus on data flow over time.
Lesson 2434FSMs vs Other Patterns
read-only
you can't change them (which makes sense for mathematical truths!
Lesson 144Math Constants: PI, E, and OthersLesson 2367The File Interface
Readability first
Business logic, configuration, one-time setup code, anything that changes frequently based on requirements.
Lesson 1933Trade-offs: Speed vs Readability vs Maintainability
Readable code
– unminified, with original variable names preserved
Lesson 2449Development vs Production Builds
Readable side
`'data'`, `'end'`, `'readable'` events, plus `read()` and `pipe()` methods
Lesson 1561What Are Duplex Streams?
Readable streams
when there's no more data to consume.
Lesson 1560Stream Events Reference
Real user data
(from Performance Observer API or RUM metrics you've learned)
Lesson 1932Setting Performance Budgets
Real-time coordination
Threads need instant visibility of changes
Lesson 2179PostMessage vs Shared Memory: When to Use Each
Real-time Systems
WebSocket messages, chat applications, or live data feeds
Lesson 2424Event Emitter Use Cases and Alternatives
Recommended fixes
(often just updating to a newer version)
Lesson 2507Audit and Security in Dependencies
Records
the dependency in your `package.
Lesson 2486Installing Packages with npm install
Recover from it
Handle the error gracefully and provide a fallback
Lesson 1235Handling Errors in Error-First Callbacks
Recurse
The bundler then parses *those* files, finding their imports, resolving them, and so on.
Lesson 2446Dependency Resolution
Recursive custom implementations
are the *slowest* but most flexible.
Lesson 2402Performance Considerations
Recursive functions
with overlapping subproblems (like Fibonacci calculations)
Lesson 2378When Memoization Helps Performance
ReDoS
(Regular Expression Denial of Service) is an attack that exploits how regex engines handle backtracking.
Lesson 1740ReDoS and Security
Reduced readability
Complex, clever code that saves microseconds but takes minutes to understand
Lesson 1928Premature Optimization Is the Root of All Evil
Reducing duplication
– write the logic once, use it everywhere
Lesson 2681Custom Matchers
Refactoring freedom
You can change `_password` internally without worrying about breaking external code
Lesson 1829Convention-Based Privacy with Underscore Prefix
Refactoring support
Rename symbols safely across your codebase
Lesson 2648Editor Experience with JSDoc
Refinements
let you add custom validation logic after the basic type checks pass.
Lesson 2638Refinements and Transformations
Regex pattern matching
tests whether strings conform to patterns:
Lesson 2677String Matching Assertions
RegExp, Map, Set
become empty objects or are lost
Lesson 2005structuredClone vs JSON Parse/Stringify
Register listeners
for named events (subscribe)
Lesson 2414The Event Emitter Pattern
Registry mirrors
Faster downloads from geographically closer servers (common in China with `cnpm`)
Lesson 2496The NPM Registry and Alternatives
Relative time formatting
means displaying time differences in natural, conversational language relative to now—like "5 minutes ago," "tomorrow," or "in 3 weeks.
Lesson 1654Intl.RelativeTimeFormat Overview
Remaining arguments
The *values* of each `${}` expression, in order
Lesson 152Tagged Template LiteralsLesson 558The call() Method
remember
those variables even after the outer function has finished executing.
Lesson 88Scope and Closures PreviewLesson 2691Testing Callback-Based APIs
Remember the rule
When the stack empties, drain ALL microtasks before taking ONE task
Lesson 1220Mental Model for Debugging Async
Remembers all previous parameters
via closure
Lesson 1765Manual Currying Example
Remove listeners
when no longer needed (unsubscribe)
Lesson 2414The Event Emitter Pattern
Remove module boundaries
through tree-shaking and scope hoisting
Lesson 1437Cache Behavior in Development vs Production
Rename
functions for clarity in different contexts
Lesson 428Assigning Functions to Variables
Renaming exports
Changing `export function oldName()` to `export function newName()` forces users to update all references.
Lesson 2519MAJOR: Breaking Changes
Rendering functions
called for every pixel or DOM element
Lesson 1903When Micro-Optimizations Do Matter
Rendering opportunity
(browser decides if it's time to paint)
Lesson 1216The Rendering Phase
Rendering steps
(layout, paint)
Lesson 1218Event Loop in Node vs Browser
Repeated calls
with identical arguments
Lesson 2089Memoization Decorators
Repeatedly calls `.next()`
on that iterator
Lesson 1077Consuming Iterators with for...of
Repetitive assertion patterns
you use across many tests
Lesson 2681Custom Matchers
Replace the method
entirely
Lesson 2072Method Decorators
Reports violations
when patterns match known problems or style preferences
Lesson 2602What Linters Actually Do
Requires `package-lock.json`
to exist (fails without it)
Lesson 2494npm ci for Reproducible Installs
Reserved keywords
`"if"`, `"class"`, `"return"` (when quoted)
Lesson 590Property Names and Valid Keys
Resize handlers
Recalculate layout at intervals, not continuously
Lesson 2387What Throttle Solves
Resolve Paths
For each dependency, it determines the actual file path.
Lesson 2446Dependency Resolution
Resource management
Keep connection pools reasonable
Lesson 1372Batching and Parallelism Limits
Response object
a wrapper that contains everything about the HTTP response: status codes, headers, and methods to access the body content.
Lesson 2256The Response Object
Response streams
let you access data as it arrives, chunk by chunk, rather than blocking until everything downloads.
Lesson 2290Understanding Response Streams
Rest must be last
The rest element must always be the final variable in your destructuring pattern.
Lesson 983Rest in Array Destructuring
rest parameter
to collect all remaining arguments into a true array.
Lesson 412Rest Parameters: Collecting Remaining ArgumentsLesson 980Rest Parameters Syntax
Restart the ESLint server
through your editor's command palette ("ESLint: Restart ESLint Server").
Lesson 2592Troubleshooting Editor Integration Issues
Result type
or **Either pattern**.
Lesson 1167Result Types and Either Pattern
Rethrow it
Pass the error up to a higher-level handler
Lesson 1235Handling Errors in Error-First Callbacks
Retry values
Return a signal that lets the chain try an alternative approach
Lesson 1281Recovering from Errors with .catch()
Return address
Where to resume execution after the function completes
Lesson 1183Stack Frames and Function Context
Return an error value
return a special value (like `null`, `undefined`, or an error object) that the caller must check
Lesson 1149Throwing vs Returning Error Values
Return early
when you encounter an error — this prevents wrapping the success path in another `else` block
Lesson 1255Limiting Nesting Depth
Returning a primitive
(string, number, boolean, etc.
Lesson 766Return Values from Constructors
Returning an object
The returned object becomes the result of the `new` expression, replacing the instance.
Lesson 766Return Values from Constructors
Returns an iterator
You can loop over it with `for.
Lesson 162matchAll(): Iterating Over All Matches
Returns another function
(except the innermost one)
Lesson 1765Manual Currying Example
Returns control
to the event loop immediately
Lesson 1351The Implicit Microtask Queue
Returns the object automatically
– The newly created object is returned (you don't write `return`)
Lesson 750The new Keyword with Classes
Reusable iterables
Every call to `[Symbol.
Lesson 2014Reusable vs Single-Use Iterators
Reusing results
Arrays can be iterated multiple times; generators are one-time-use
Lesson 1127When to Choose Lazy vs. Eager
Revealing Module Pattern
flips the script: you define *all* your functions and variables privately within the module, then at the very end you return an object that "reveals" only the parts you want to make public.
Lesson 1842The Revealing Module Pattern
Revenue-critical flows
Sign-up, checkout, payment processing
Lesson 1934Hot Paths and Critical User Journeys
Reversible
You can always reconstruct the Date using `new Date(isoString)`.
Lesson 1630toISOString for Standard Format Output
Review hot paths together
During sprint planning or architecture reviews, explicitly identify which code paths are performance-critical (your 20% that handles 80% of load).
Lesson 1936Building a Performance Culture Without Obsession
Roll your own
custom implementation (like you've been practicing)
Lesson 2423Node.js EventEmitter vs Custom Implementations
Rollup Plugin Visualizer
generates similar charts for Rollup builds
Lesson 2473Verifying Tree Shaking Results
Rspack
(Webpack-compatible), and even **Next.
Lesson 2462SWC and modern bundler foundations
Rule conflicts
ESLint and Prettier can clash; plugins may contradict each other
Lesson 2606The Cost of Configuration
Rule of thumb
Tasks taking more than **50ms** risk causing dropped frames (at 60 FPS, each frame has ~16ms).
Lesson 2192Measuring Task Duration with Performance APIs
Run one task
from the task queue (if any are waiting)
Lesson 1195The Event Loop Tick Cycle
Run the current script
(or task) from the task queue to completion
Lesson 1214Order of Execution in the Loop
Running tests
`"test": "node test.
Lesson 2511The Scripts Field in Package.json
Runs the constructor method
– Your `constructor()` function executes, with `this` bound to that new object
Lesson 750The new Keyword with Classes
Runtime Budgets
"Page interactions must respond within 100ms"
Lesson 1932Setting Performance Budgets
Runtime information
memory usage, uptime, Node.
Lesson 1496What is the Process Object?
Russian
changes forms based on the last digit of the number
Lesson 2228Understanding Pluralization Across Languages
Rust
, offering blazing-fast transpilation and minification that's 20-70x faster than Babel.
Lesson 2462SWC and modern bundler foundations

S

Safe
You can't accidentally go past the string's end
Lesson 352For...of with Strings
Safe copying
Data is cloned by default, preventing shared-state bugs
Lesson 2168PostMessage Overview: Sending Data Between Contexts
Safety matters most
No risk of race conditions since data is copied
Lesson 2179PostMessage vs Shared Memory: When to Use Each
Same length
All elements pass the test
Lesson 447Filter Returns a Subset
Same-origin policy applies
Scripts must be from the same origin or served with proper CORS headers
Lesson 2155Importing Scripts in Workers
Scalability issues
Adding new code becomes risky
Lesson 1466Global Namespace Pollution
Scale
You're displaying many region/language/currency names and maintaining translations manually would be error-prone
Lesson 2246When to Use ListFormat and DisplayNames
Scientific computing
involving very large integers (like calculating factorials of big numbers or working with astronomical distances in millimeters) requires exact integer arithmetic without any approximation.
Lesson 126When to Use BigInt InsteadLesson 1972When to Use BigInt vs Number
scientific notation
(also called **e-notation**) to express these values more clearly.
Lesson 102Scientific Notation (e-notation)Lesson 2205Grouping and Notation Options
Scientific simulations
Parallel computation on large matrices or data grids
Lesson 2189When SharedArrayBuffer Makes Sense
Scope
is the set of rules that determines where in your code a variable can be accessed.
Lesson 77What is Scope?Lesson 533Debugging Closure Memory Issues
Scope simplicity
Flat chains avoid deeply nested scopes.
Lesson 1295Chaining vs Nesting
Scrimba
offer interactive video courses with browser-focused projects
Lesson 1495Where to Learn More About Web Development
Scroll handlers
Update a "scroll progress" indicator every 100ms, not every pixel
Lesson 2387What Throttle SolvesLesson 2390Debounce vs Throttle: When to Use Which
Scroll stutter
Smooth scrolling becomes choppy
Lesson 2191Main Thread Blocking and User Experience
Scrolling
Scroll events fire continuously as the user moves the page.
Lesson 2383What Debounce Solves
Search autocomplete
Only fetch results after the user pauses typing.
Lesson 2383What Debounce Solves
Search for "Detached"
in the constructor filter to see all detached nodes at once
Lesson 1891Identifying Detached DOM Nodes
Search input
Wait until the user stops typing before sending an API request
Lesson 2390Debounce vs Throttle: When to Use Which
Search-as-you-type
Each keystroke fires a request, but only the latest matters
Lesson 2300Why AbortController Exists
Searching
Exit as soon as you find what you need
Lesson 370Loop control best practices and readability
Second iteration
`sum` is `10`, `price` is `25` → returns `35`
Lesson 457Summing Numbers with ReduceLesson 459Flattening Arrays with Reduce
second parameter
that lets you define properties *with full control over their descriptors* right when you create the object.
Lesson 725The propertiesObject ParameterLesson 1236Success Path: Using the ResultLesson 2339Endianness in DataView
Security concerns
npm lacked robust integrity checking, making it harder to verify that downloaded packages hadn't been tampered with during transit.
Lesson 2527Why Alternative Package Managers Exist
Security first
Your code can't access files, networks, or environment variables unless you explicitly allow it
Lesson 19Deno and Bun: Alternative Runtimes
Security patches
addressing vulnerabilities
Lesson 2521PATCH: Bug Fixes and Safe Updates
Security patterns
Known dangerous patterns like `eval()`
Lesson 2603Automation vs. Human Judgment
Security risks
Creating functions from strings is similar to `eval()` — it can execute arbitrary code, making your application vulnerable if the strings come from user input.
Lesson 387Function Constructor (Rarely Used)Lesson 1465Implicit Global Access
Security scanning
Some organizations route through registries that scan for vulnerabilities
Lesson 2496The NPM Registry and Alternatives
Security-sensitive data
Authentication tokens, encryption keys, or internal state that must never leak
Lesson 1991When to Use Private Fields
Select "Heap snapshot"
from the profiler types
Lesson 1885Taking a Heap Snapshot
Self-reference
The function can reference itself by name (useful for recursion, though you haven't learned that pattern yet):
Lesson 383Named Function Expressions
Send messages
with format like `{ id, type, data }`
Lesson 2176Request-Response Patterns with PostMessage
Separation of concerns
The algorithm (process and sort) is separate from the policy (how to sort)
Lesson 437Functions as Configuration
Server politeness
Avoid hammering external services
Lesson 1372Batching and Parallelism Limits
Servers (Node.js)
JavaScript powers the backend of countless websites and applications.
Lesson 5JavaScript Beyond the Browser
Setup complexity
You must mock every async operation in the chain.
Lesson 1251Testing Callback Hell Code
Setup time
Complex configurations take hours or days to design and test
Lesson 2606The Cost of Configuration
Severity levels
(low, moderate, high, critical)
Lesson 2507Audit and Security in Dependencies
Shallow cloning
(spread or `Object.
Lesson 696Choosing the Right Clone Strategy
Share context, not shame
When performance issues arise, discuss them as learning opportunities.
Lesson 1936Building a Performance Culture Without Obsession
Shared across all instances
there's only one copy
Lesson 785Static Properties
Shared mutable state
is the primary culprit.
Lesson 2670Avoiding Test Interdependence
Shared prototypes
let all instances reference the *same* function:
Lesson 522Avoiding Closure Overhead
SharedArrayBuffer
Multiple threads access the same memory directly
Lesson 2179PostMessage vs Shared Memory: When to Use Each
Shopping cart items
Array (ordered, duplicates possible)
Lesson 1072Decision Framework: Choosing the Right Collection
Short flags
like `-p 3000` work seamlessly
Lesson 1513Argument Parsing Libraries: minimist
Shorter
Most common — only some elements match
Lesson 447Filter Returns a Subset
Should.js
for a different flavor
Lesson 2657Mocha: The Flexible Runner
side effect
occurs when a function does something other than just compute and return a value.
Lesson 1743Side Effects DefinedLesson 2120Effects and Side EffectsLesson 2469Side Effects and 'sideEffects' Field
Side effects must sequence
Creating a user account before sending a welcome email
Lesson 1368Choosing Between Sequential and Parallel
Side-effect-free code
Bundlers must be confident that removing code won't break anything
Lesson 2447Dead Code Elimination
signal
is a reactive container that holds a single value and automatically notifies any dependent code when that value changes.
Lesson 2117What Are Signals?Lesson 2118Signal Creation and Reading
Signal sent
This signals the readable stream (or your code) to pause
Lesson 1576How Backpressure Works Internally
Signals are pull-based
they hold a current value that consumers read on demand.
Lesson 2124Signals vs Observables
Signed
means it can represent both positive and negative numbers
Lesson 254The Binary Number System Refresher
Silent failures
No error occurs—your code just behaves strangely
Lesson 52Pitfall: Unintended Shared State
Simple comparisons in conditions
`x > 5 && y < 10`
Lesson 273When to Rely on Precedence vs Parentheses
Simple event handlers
work fine with callbacks:
Lesson 2145When Simple Callbacks or Promises Are Better
Simple needs
You only compare plain objects with known structure
Lesson 2413When to Use Libraries vs Rolling Your Own
Simple one-time operations
Fetching data once?
Lesson 2139Identifying Problems Suited for Reactive Patterns
Simple splitting
Splitting on a single character?
Lesson 1676Common Mistakes and When Regex Is Overkill
Simple substring checks
If you're just checking whether a string contains "hello", use `str.
Lesson 1676Common Mistakes and When Regex Is Overkill
Simple to understand
it's just a function returning an object literal
Lesson 668What Are Factory Functions?
Simpler mental model
No synchronization primitives needed
Lesson 2179PostMessage vs Shared Memory: When to Use Each
Simplicity
You don't need complex locking mechanisms to protect shared data
Lesson 1187Single-Threaded ExecutionLesson 1615Date.now for Current Timestamp
Simplicity matters
Arrays are familiar, easier to debug, and work with existing array methods
Lesson 1127When to Choose Lazy vs. Eager
Simplifying conditionals
Reduce nesting levels
Lesson 420Early Returns for Control Flow
Single async operation
Plain `await` is simpler for one-off promises
Lesson 2037When to Prefer For-Await-Of
Single asynchronous operations
are best handled with Promises:
Lesson 2145When Simple Callbacks or Promises Are Better
Single expression
Skip the braces and `return` (implicit return)
Lesson 392Arrow Function Syntax Basics
Single Reduce
processes the array only once and doesn't create intermediate arrays, which *can* be faster with large datasets.
Lesson 461Chaining Operations vs Single Reduce
Single state
The system is in exactly one state at a time
Lesson 2425What Is a Finite-State Machine?
single thread
, meaning it can execute only one piece of code at any given moment.
Lesson 1175The Single-Threaded Nature of JavaScriptLesson 1179The Misconception of 'Parallel' Execution
Single-use iterables
The iterator exhausts after one pass, and subsequent iterations yield nothing
Lesson 2014Reusable vs Single-Use Iterators
Singleton
Use when you genuinely need exactly one instance (like a global config manager or logging service).
Lesson 1850When to Use Each Pattern
Size Comparison
means tracking bundle size over time.
Lesson 2473Verifying Tree Shaking Results
Size constraints
Your bundle can't afford 20KB for one function
Lesson 2413When to Use Libraries vs Rolling Your Own
Skip it
for internal tools, single-locale apps, or when you're just joining 2-3 fixed English words with "and.
Lesson 2246When to Use ListFormat and DisplayNames
Skips unnecessary work
if a computed's value didn't actually change
Lesson 2122Signal Graphs and Propagation
Small codebases
(under ~5,000 lines): Adding types with JSDoc comments keeps you in standard JavaScript.
Lesson 2643Assessing Project Complexity and Team Size
Small teams
(1–3 developers): Onboarding is faster when collaborators don't need to learn TypeScript syntax, tooling quirks, or debugging source maps.
Lesson 2643Assessing Project Complexity and Team Size
Small, Coordinated Teams
When your team is small enough that everyone understands most of the codebase, a monorepo reduces the overhead of managing separate repositories.
Lesson 2552When a Monorepo Makes Sense
Smaller bundles
(unused code paths removed)
Lesson 2451Environment Variables and Build-Time Constants
Snapshot serializers
let you define custom rules for how certain types of objects should appear in your snapshot files.
Lesson 2711Snapshot Serializers
Snapshots
Automatically save and compare output to detect unexpected changes—especially useful for UI testing.
Lesson 2655Jest: The All-in-One Runner
Solution
Use `let` (block-scoped), or create a new scope with an IIFE, or pass `i` as a parameter:
Lesson 1211Common setTimeout PitfallsLesson 1927Common Measurement Pitfalls
Solution 1: Using `encodeURIComponent()`
Lesson 2356Encoding Unicode Strings Safely
Sortable
These strings sort alphabetically in chronological order—perfect for databases and file names.
Lesson 1630toISOString for Standard Format Output
Source code
is written with modern syntax (`const`, arrow functions, etc.
Lesson 2445Transpilation for Browser Compatibility
Source maps
– detailed mappings back to your original source files
Lesson 2449Development vs Production Builds
SPDX identifiers
like `"MIT"`, `"Apache-2.
Lesson 2544Repository, License, and Metadata
Special object types
Correctly clones Dates, RegExps, Maps, Sets, ArrayBuffers, typed arrays, and more
Lesson 2403Library Solutions: Lodash cloneDeep
Special objects
RegExp, Map, Set lose their behavior
Lesson 2397JSON.parse(JSON.stringify()) Method
Specific assertions
express intent clearly and provide context:
Lesson 2683Choosing the Right Assertion
Specify depth when possible
instead of using `Infinity`.
Lesson 895Performance Characteristics of flat() and flatMap()
Spectre attacks
a hardware vulnerability that allows reading sensitive data from other processes by measuring execution timing with extreme precision.
Lesson 2181Security Requirements for SharedArrayBuffer
Speed first
Real-time systems, animation loops, high-traffic API endpoints where milliseconds multiply across millions of requests.
Lesson 1933Trade-offs: Speed vs Readability vs Maintainability
Spread
requires placing the iterable inside array brackets:
Lesson 967Spread vs Array.from
Stability
Your CI/CD pipeline uses the same dependencies as development
Lesson 2499The Purpose of Lockfiles
Stability Over Novelty
Teams prioritize feature delivery over syntax modernization.
Lesson 2105When You Might Still See Legacy Decorators
stack trace
a text record showing the sequence of function calls that led to the error.
Lesson 1143Error.prototype.stackLesson 1250Debugging Nested Callbacks
Stack traces
`Error` objects automatically capture where the error occurred, making debugging far easier
Lesson 1141What Can Be ThrownLesson 1153Setting the Error Name Property
Stage 3 approach
Decorators receive a *value* and context object, then return a new value or replacement function.
Lesson 2068The Stage 3 Decorators Proposal
Stage 3 Decorators Proposal
represents the current, near-final specification for decorators in JavaScript.
Lesson 2068The Stage 3 Decorators Proposal
Staircase pattern
Memory climbs with each action and never drops
Lesson 1893Performance Monitor for Memory Trends
Standard math
Calculations within ±9 quadrillion (Number.
Lesson 1972When to Use BigInt vs Number
Starting servers
`"start": "node app.
Lesson 2511The Scripts Field in Package.json
State consistency
Shared state remains consistent across import styles
Lesson 1435Dynamic Import and the Cache
State is shared
If a module maintains internal state (like a counter or cached data), that state is shared across all imports.
Lesson 1407Modules Are Singletons
State management is complex
Objects excel at maintaining internal state across method calls.
Lesson 1859When to Use OOP vs Other Paradigms
State management, undo systems
→ Deep clone
Lesson 696Choosing the Right Clone Strategy
State snapshots
for undo/redo systems where history must be fully independent
Lesson 2007When to Use structuredClone
State-dependent behavior
– When the same event triggers different actions based on current state (clicking "submit" while "idle" vs "processing").
Lesson 2432When to Use FSMs in JavaScript
Stately
and other visualizers that render your state machine as a diagram.
Lesson 2433FSM Libraries: XState Overview
Statement Coverage
is similar to line coverage but counts logical statements rather than physical lines.
Lesson 2716What Code Coverage MeasuresLesson 2718Reading Coverage Reports
Static (Lexical) Scope
The variable's location is determined by where the function is *written* in the code.
Lesson 490Static vs Dynamic Scope
Static imports
are declarations like `import { foo } from '.
Lesson 2467Static vs Dynamic Imports
static initialization block
runs exactly once when the class is evaluated, giving you a dedicated space for this complex initialization.
Lesson 787Static Initialization BlocksLesson 796Class Static Initialization Blocks
static methods
belong to the class rather than instances, **static properties** are variables stored on the class itself.
Lesson 785Static PropertiesLesson 794Accessing Private Fields in Methods
static scope
) means that a function's access to variables is determined by its physical location in the code when you *write* it, not where you *call* it.
Lesson 82Lexical ScopeLesson 490Static vs Dynamic Scope
Steadily climbing
Continuous upward trend even when idle
Lesson 1893Performance Monitor for Memory Trends
Stop and wait
while it reads, parses, and executes `utils.
Lesson 1446Synchronous Loading in CommonJS
Stop at null
the chain ends when there's no more prototype
Lesson 698The Prototype Chain Concept
stop immediately
, not just exit the inner loop but abandon the entire search.
Lesson 335Common Patterns: Matrix Search and Multi-Level BreakLesson 471Short-Circuit Behavior in Some
stops
at each `yield` and the value after `yield` becomes the `value` property in the result object.
Lesson 1098The Yield KeywordLesson 1322Catch Placement: End vs Middle of Chain
Storage efficiency counts
Saving binary data to IndexedDB or file systems that accept ArrayBuffers directly
Lesson 2360Base64 Overhead and When to Avoid It
Store information
locally using localStorage or sessionStorage
Lesson 17Browser Runtime: DOM and Web APIs
Store pending requests
in a Map with ID as key, resolver callback as value
Lesson 2176Request-Response Patterns with PostMessage
Store them in variables
Lesson 385Functions as Values
Stored by value
When you work with a primitive, you're working with the actual value, not a reference to it.
Lesson 31The Seven Primitive Types
Storing private data
for objects you don't control the lifecycle of
Lesson 1062Memory Management Benefits
Strategy
Use when you have multiple algorithms for the same task and need to swap them at runtime (payment processors, validation rules).
Lesson 1850When to Use Each Pattern
Streaming processing
Handle massive files without loading everything into memory
Lesson 2291Accessing the ReadableStream
Streams
Reading file chunks, network data arriving in pieces, or processing large datasets incrementally
Lesson 2424Event Emitter Use Cases and Alternatives
Stretch the ruler
by multiplying by your desired range
Lesson 1602Generating Random Integers with Math.random
Strict equality (`===`)
requires both type *and* value to match, so a BigInt will never strictly equal a Number, even if they represent the same mathematical value
Lesson 131Comparison and Equality with BigIntLesson 301Strict vs Loose Equality
Strings
→ parsed as numeric literals; whitespace is trimmed; empty/whitespace-only strings become `0`; invalid formats become `NaN`
Lesson 279ToNumber Abstract OperationLesson 841Array.from with IterablesLesson 1470Local Storage and Session StorageLesson 2284Request Body Basics
Strip away unrelated code
– Remove everything that doesn't contribute to the leak
Lesson 1894Reproducing Leaks Systematically
Style issues
Code that works but violates team conventions (spacing, quotes, naming)
Lesson 2602What Linters Actually Do
Style preference
`return await` makes it explicit that you're waiting for an async operation.
Lesson 1350Await and Return Values
Style tip
Most developers prefer `function*` with the asterisk touching the keyword, making it immediately recognizable.
Lesson 1097Generator Function Syntax
subject
) maintains a list of dependents (the **observers**) and automatically notifies them when its internal state changes.
Lesson 2106What Is the Observer Pattern?Lesson 2107The Subject InterfaceLesson 2109Implementing a Simple Subject
Subjective interpretations
Is fixing a bug that code depended on a PATCH or a MAJOR?
Lesson 2526Semver in Practice: Trust and Reality
Sublime Text
Install "JsPrettier" via Package Control
Lesson 2586Prettier Editor Extensions
subscribe
to an observable, you're saying "call this function whenever new data arrives.
Lesson 1879Observables and SubscriptionsLesson 2106What Is the Observer Pattern?
Subscribing
is what starts the Observable, like pressing "play" on a streaming service.
Lesson 2130Subscribing to Observables
Substring checks
verify that a string contains specific text:
Lesson 2677String Matching Assertions
SWC
(Speedy Web Compiler) is a Rust-based platform for compiling, minifying, and bundling JavaScript and TypeScript.
Lesson 2462SWC and modern bundler foundationsLesson 2463Comparing bundler performance characteristics
switch statement
evaluates an expression once, then compares its value against multiple `case` labels.
Lesson 320The Switch Statement SyntaxLesson 2434FSMs vs Other Patterns
Symbol properties
Preserves symbol-keyed properties
Lesson 2403Library Solutions: Lodash cloneDeep
Symbol-keyed properties
(only string keys are included)
Lesson 641Object.keys() for Own Enumerable String Keys
Sync callbacks
execute immediately during the current call stack:
Lesson 1231Callback Pattern Summary
Synchronous
means that JavaScript executes your code sequentially, one statement at a time, in the order it appears.
Lesson 1170What 'Synchronous' Means in JavaScriptLesson 1453Requiring ESM from CJSLesson 1517FS Module Overview: Sync vs Async vs Promises API
Synchronous (sync)
Blocks code execution until the operation completes
Lesson 1517FS Module Overview: Sync vs Async vs Promises API
synchronous callbacks
that run immediately when the outer function calls them.
Lesson 1224Asynchronous CallbacksLesson 1225Callback Execution Context
Synchronous iteration
Array methods like `map`, `filter`, and `forEach` use callbacks to process each element
Lesson 1231Callback Pattern SummaryLesson 2020Async Iteration vs Sync Iteration
Synchronous loading
Unlike module imports, `importScripts()` blocks execution until all scripts load
Lesson 2155Importing Scripts in Workers
Synchronous transforms
Pure calculations on static data don't need reactive overhead.
Lesson 2139Identifying Problems Suited for Reactive Patterns
Syntax Complexity
Nested generics and complex conditional types become unreadable.
Lesson 2621Editor Support and Limitations
Syntax errors
Malformed code that would break at runtime (`const x =;`)
Lesson 2602What Linters Actually DoLesson 2603Automation vs. Human Judgment

T

Take one task
Execute the next task from the task queue, then repeat from step 3
Lesson 1219Tracing Execution with a Diagram
Take the first snapshot
before performing an action (like opening a modal, loading data, or running a function)
Lesson 1887Comparing Two Snapshots
Take the next task
grab one task from the task queue and repeat
Lesson 1214Order of Execution in the Loop
Target length
the final length you want
Lesson 177Padding Strings with padStart and padEnd
Task queue callbacks
(like `setTimeout`) wait indefinitely
Lesson 1217Blocking the Event Loop
Task scheduling
Defer work until the right moment
Lesson 519Callback Queues
Team disagreement
Patchwork disabling indicates your team needs to align on standards
Lesson 2607When to Disable Rules
Team Experience
A team familiar with Jest will be productive faster than forcing them to learn something "better.
Lesson 2661Choosing the Right Test Runner
Team Familiarity
Your team already knows NPM.
Lesson 2536Choosing the Right Package Manager
Team familiarity is low
well-known symbols have a learning curve
Lesson 1022When to Use Well-Known Symbols
Team Size and Experience
influences your choice too.
Lesson 2465Choosing a bundler for your project
Team unfamiliarity
Reactive patterns have a learning curve.
Lesson 2139Identifying Problems Suited for Reactive Patterns
Temperature differences
, **error margins**, and **coordinate differences** all benefit from `Math.
Lesson 1596Math.abs for Absolute Values
Temporal Dead Zone (TDZ)
isn't just a concept—it has a specific lifespan.
Lesson 94TDZ Timeline and DurationLesson 97Class Hoisting and the TDZ
Terms below were extracted from bolded phrases in lesson content. Click a lesson reference to jump
ternary operator
is JavaScript's only operator that takes three operands.
Lesson 227The Ternary Operator SyntaxLesson 266Precedence Levels Overview
Test before updating
Never blindly update; run your test suite first
Lesson 2526Semver in Practice: Trust and Reality
Test boundary cases
run your loop with an array of length 0, 1, and 2
Lesson 349Classic Off-by-One Errors
Test Isolation
You want to test *your* code, not someone else's API or the reliability of your network connection.
Lesson 2694What is Mocking and Why Mock?
Test patterns
with long, worst-case strings
Lesson 1740ReDoS and Security
Testable
Write a test once, it stays valid forever
Lesson 1742Deterministic Output: Same Inputs, Same Results
Testing code
across different environments
Lesson 1461GlobalThis for Universal Code
Testing Edge Cases
Want to test how your code handles a 500 server error or a timeout?
Lesson 2694What is Mocking and Why Mock?
Text-only channels
Embedding images in CSS/HTML (`data:` URLs), JSON APIs that only accept strings, email attachments
Lesson 2360Base64 Overhead and When to Avoid It
Then
Convert the resulting primitive to a number
Lesson 282Object-to-Number Coercion
Then symbol keys
(in insertion order)
Lesson 646Iteration Order and When It Matters
there.
Third iteration
`sum` is `35`, `price` is `5` → returns `40`
Lesson 457Summing Numbers with ReduceLesson 459Flattening Arrays with Reduce
Third-party code patterns
A library requires a specific structure that triggers warnings (e.
Lesson 2607When to Disable Rules
Third-party data
doesn't come with type guarantees
Lesson 2632Why Runtime Validation Matters
This isn't true
While `await` pauses execution *within* that specific async function, other code continues running elsewhere.
Lesson 1392Assuming Synchronous Execution Order
Thread A
Read value (0) → Add 1 → Write back (1)
Lesson 2183Race Conditions Without Atomics
Thread B
Read value (0) → Add 1 → Write back (1)
Lesson 2183Race Conditions Without Atomics
three pieces of information
each time it calls your function:
Lesson 441Map's Callback ParametersLesson 446Filter's Callback Parameters
Throw an error
immediately halt execution and jump to the nearest catch block
Lesson 1149Throwing vs Returning Error ValuesLesson 1161Throwing vs Returning Errors
Throw statement
You can explicitly throw your own errors:
Lesson 2435The Traditional Throw/Try-Catch Pattern
Throws away
the wrapper immediately after
Lesson 43Primitive Wrapper Objects
Tightly Coupled Packages
If you're building packages that frequently need to work together—like a UI component library with its documentation site, or a main application with several plugins—a monorepo ensures changes stay synchronized.
Lesson 2552When a Monorepo Makes Sense
tilde
(`~`) when you need extra stability or have experienced breaking changes disguised as MINOR updates.
Lesson 2523Version Ranges in package.jsonLesson 2524Caret (^) vs Tilde (~) Ranges
Time delay
Asynchronous gaps mean the stack resets between callbacks
Lesson 1250Debugging Nested Callbacks
Time pressure
makes refactoring risky right now
Lesson 1262Balancing Pragmatism and Refactoring
Timeout regex execution
in critical paths (though JavaScript doesn't have built-in timeouts)
Lesson 1740ReDoS and Security
Timeouts
You want to abandon a slow request after X seconds
Lesson 2300Why AbortController Exists
Timestamps in microseconds
Going beyond millisecond precision
Lesson 1972When to Use BigInt vs Number
Timing issues
Each callback depends on the previous one completing.
Lesson 1251Testing Callback Hell Code
ToNumber on both sides
when types don't match.
Lesson 295Comparison Coercion with Mixed Types
Too lenient
Coverage erodes gradually.
Lesson 2723Coverage in CI/CD
Too strict
Teams get frustrated writing tests just to hit numbers, leading to meaningless tests.
Lesson 2723Coverage in CI/CD
Tooling Requirements
Do you need monorepo workspaces?
Lesson 2536Choosing the Right Package Manager
Top-Down Reading Flow
Many developers prefer organizing functions so you read from high-level to low-level, like a newspaper article.
Lesson 426Best Practices for Function Ordering
top-level await
lets you use `await` directly at the top level of an ES module (a file that uses `import`/`export`).
Lesson 1376What Is Top-Level Await?Lesson 1978What is Top-Level Await
Topologically sorts
updates to ensure parent nodes compute before children
Lesson 2122Signal Graphs and Propagation
Track async callbacks
Note when `setTimeout` schedules a task or `.
Lesson 1219Tracing Execution with a Diagram
Tracking temporary object relationships
without worrying about cleanup
Lesson 1062Memory Management Benefits
Traditional `for` loops
are typically the fastest.
Lesson 374For vs ForEach vs For...of Performance
Traditional Scripts
| **ES Modules** |
Lesson 1396What Are ES Modules?
Trailing
Search boxes, window resize handlers, autosave — you care about the final state
Lesson 2385Leading vs Trailing Edge DebounceLesson 2389Leading and Trailing Options in Throttle
Transaction costs
Database or API calls in a loop
Lesson 1900Batch Operations vs Individual Updates
Transferable objects
solve this by *transferring ownership* instead of copying.
Lesson 2152Transferable ObjectsLesson 2172Transferable Objects: Zero-Copy Data Transfer
Transformation
Convert or format data before assignment
Lesson 660Defining Setters with the 'set' Keyword
Transformations
let you modify data *after* validation passes.
Lesson 2638Refinements and Transformations
Transforming
modern syntax to browser-compatible code
Lesson 2462SWC and modern bundler foundations
Translation management workflows
with external translators
Lesson 2253Deciding Between Built-ins and Libraries
Transpilation
solves this by converting modern JavaScript into equivalent older syntax that legacy browsers can interpret.
Lesson 2445Transpilation for Browser CompatibilityLesson 2453What is a bundler and why do we need one?
Transpiler
rewrites it to ES5 or another target version
Lesson 2445Transpilation for Browser Compatibility
Trigger side effects
(logging, updating UI when values change)
Lesson 667When to Use Getters/Setters vs Plain Properties
Try block
Wrap risky code that might fail:
Lesson 2435The Traditional Throw/Try-Catch Pattern
Try/catch blocks
wrap your `await` expressions:
Lesson 1360Try/Catch vs .catch() on Promises
TTFB
, use the Navigation Timing API:
Lesson 1926Real User Monitoring Metrics
Turbopack
(from Vercel), **Rspack** (Webpack-compatible), and even **Next.
Lesson 2462SWC and modern bundler foundations
Two numbers
Add them mathematically.
Lesson 275String Coercion with the + Operator
Two or more parameters
Parentheses **required** — `(x, y) => .
Lesson 395Parentheses in Arrow Function Parameters
Type a constructor name
(like `Array`, `MyClass`, or `HTMLDivElement`) to see only those instances
Lesson 1888Filtering by Constructor Name
Type annotations
Adding missing type hints (in TypeScript contexts)
Lesson 2590Quick Fix and Auto-Fix in Editors
Type checking
You can use `instanceof Error` to distinguish errors from normal values
Lesson 1141What Can Be Thrown
Type hints
that editors understand and use for IntelliSense
Lesson 2609What JSDoc Is and Why It Matters
Type mismatch
If types differ, return `false`
Lesson 2406Recursive Deep Equality Algorithm
Type safety is missing
In Haskell, the type system enforces functor laws (identity and composition).
Lesson 1799Functor/Monad Pattern Mismatch in JS
Type-level programming
treating types themselves as data to transform—is TypeScript's domain.
Lesson 2649Limitations: When TypeScript Becomes Necessary
Typed arrays and ArrayBuffers
`Uint8Array`, `ArrayBuffer`
Lesson 2151What Data Can Be Transferred?
TypeError
if you try to destructure from values that aren't destructurable:
Lesson 936Failed Destructuring and Errors
TypeScript declaration files
(`.
Lesson 2629Type Checking Imported Modules
TypeScript support
No setup needed—TypeScript works out of the box
Lesson 19Deno and Bun: Alternative Runtimes
TypeScript type changes
Not technically breaking JavaScript, but breaks TypeScript builds
Lesson 2526Semver in Practice: Trust and Reality
Typing in an input
Every keystroke triggers an event.
Lesson 2383What Debounce Solves

U

UI Events
Button clicks, mouse movements, keyboard input—events that can fire many times
Lesson 2424Event Emitter Use Cases and Alternatives
UI state management
(most updates are small and infrequent)
Lesson 1763Performance Considerations with Immutability
Uint8Array
is standard JavaScript available in browsers and all JavaScript environments.
Lesson 1591Buffer and TypedArrays
Unavoidable browser quirks
Working around platform-specific issues that look like anti-patterns
Lesson 2607When to Disable Rules
Undeclared
means the variable doesn't exist at all—you never created it
Lesson 32undefined: The Default Value
Undeclared variables
Accessing `usrName` when you meant `userName`
Lesson 2605Preventing Bugs Before Runtime
Undefined's subtle differences
While `undefined === undefined` works, you need to decide whether `null` and `undefined` should be considered equal in your deep comparison (usually they shouldn't be).
Lesson 2410Edge Cases: Null, Undefined, and NaN
Underscore
have been refined through years of real-world use, handling edge cases you might not anticipate.
Lesson 2392Using Lodash or Underscore Implementations
Undo/redo
functionality becomes trivial (store history)
Lesson 1846The Command Pattern
Undo/redo functionality
(storing previous states)
Lesson 689Why Object Cloning Matters
Unexpected changes
If you pass an array to a function that mutates it, your original data changes
Lesson 810What 'Mutating' Means for ArraysLesson 2707What Are Snapshot Tests?
Unhandled rejections
If a promise rejects but you don't handle it properly, assertions in the rejection path may never execute, causing tests to pass incorrectly.
Lesson 2692Avoiding False Positives with Assertions
Unicode
is a universal standard that assigns a unique number (called a "code point") to every character from every writing system—including letters, numbers, symbols, and even emojis.
Lesson 183What is Unicode and Why It Matters
Unicode + Case-Insensitive (`ui`)
Handle Unicode characters properly while ignoring case
Lesson 1728Combining Multiple Flags
Unicode property escapes
like `\p{Emoji}` or `\p{Letter}`
Lesson 1726Unicode Mode with 'u'
Unified abstraction
WebSockets, SSE, and polling all become streams you can transform with the same operators
Lesson 2142Real-Time Data and Live Updates
Union types
use the pipe operator (`|`) to list alternatives:
Lesson 2615Union Types and Optional Parameters
Unique execution
Each module runs once, even if imported multiple times
Lesson 1408Type='module' in HTML
Unit tests
examine individual functions or methods in isolation—testing one thing at a time.
Lesson 2671Balancing Test Granularity
Universal standard
Works in browsers AND Node.
Lesson 1449When to Use CommonJS in Modern Projects
Unknown consumers
You don't know upfront what will need the derived data
Lesson 2143Derived State and Automatic Recalculation
Unlimited flexibility
Any sorting logic works without changing `processList`
Lesson 437Functions as Configuration
Unmarked space
This car was abandoned — tow it away and mark the space as available
Lesson 1864The Sweep Phase
Unnecessary currying
Currying every function "just because" adds cognitive overhead without practical benefit.
Lesson 1796Recognizing Over-Abstraction in Functional Code
Unquoted property names
follow JavaScript identifier rules: start with a letter, underscore, or dollar sign; contain only letters, digits, underscores, or dollar signs.
Lesson 590Property Names and Valid Keys
Unreachable code
Code after a `return` statement that will never execute
Lesson 2605Preventing Bugs Before Runtime
Unreadable directly
You can't access its bytes without using a "view" (like Typed Arrays, which you've already learned about)
Lesson 2332What is an ArrayBuffer?
Unsafe patterns
Comparing with `==` instead of `===` when type coercion could cause surprises
Lesson 2605Preventing Bugs Before Runtime
Unserializable Data
If you try to send a function, DOM node, or other non-cloneable object, `postMessage` will throw a `DataCloneError`:
Lesson 2177Error Handling in Cross-Context Messaging
Untouched functions
Features that have zero test presence
Lesson 2721Using Coverage to Find Gaps
Upgrade pain
ESLint major versions, plugin updates, and Flat Config migrations require rework
Lesson 2606The Cost of Configuration
UPPER_SNAKE_CASE
for constants: `MAX_SIZE`, `API_KEY`
Lesson 69Variable Naming Rules
URLSearchParams body
→ `"Content-Type": "application/x-www-form-urlencoded"`
Lesson 2289Content-Type Header and Body Matching
Use `<` not `<=`
when comparing to `length`
Lesson 349Classic Off-by-One Errors
Use `find()`
when you need the actual element:
Lesson 884Performance Characteristics and Use Cases
Use `findIndex()`
when you need the position:
Lesson 884Performance Characteristics and Use Cases
Use `includes()`
when you only need a yes/no answer: "Does this string contain 'error'?
Lesson 168Choosing the Right Search Method
Use `indexOf()`
when you need the position of a substring, or when checking existence in older code.
Lesson 168Choosing the Right Search Method
Use `JSON.parse(JSON.stringify())` when
Lesson 2402Performance Considerations
Use `match()`
when you need to *extract* matched content, not just find it.
Lesson 168Choosing the Right Search Method
Use `reduce`
When working with large datasets where performance matters, or when the transformation logic is naturally combined
Lesson 868Chaining Transformations: When Reduce Replaces Map/Filter
Use `search()`
when you need a regex pattern and only care about the *first* match position.
Lesson 168Choosing the Right Search Method
Use `slice()`
as your default choice—it's more predictable and handles negative indices logically.
Lesson 175Extracting with substring and substr
Use `structuredClone()` when
Lesson 2402Performance Considerations
Use a polyfill library
(adds missing methods to older environments) or **transpile with Babel** (converts modern code to older-compatible syntax).
Lesson 1999Browser and Node Support
Use chained `map`/`filter`
For clarity and readability in most cases
Lesson 868Chaining Transformations: When Reduce Replaces Map/Filter
Use closures
for small-scale privacy needs, event handlers, memoization
Lesson 522Avoiding Closure Overhead
Use descriptive test names
often better than message strings
Lesson 2682Assertion Error Messages
Use flatMap() over map().flat(1)
it's optimized to do both operations in one pass.
Lesson 895Performance Characteristics of flat() and flatMap()
Use lockfiles religiously
They freeze exact versions, preventing surprise updates
Lesson 2526Semver in Practice: Trust and Reality
Use Map/Set when
You need iteration, size tracking, or complete control over lifecycle.
Lesson 1064When to Use Weak vs Strong Collections
Use modules
for singletons where one closure is fine
Lesson 522Avoiding Closure Overhead
Use private fields (`#`)
for new code—they're cleaner, faster, and part of the standard.
Lesson 798Private Fields vs WeakMap Pattern
Use prototypes
when creating many similar instances
Lesson 522Avoiding Closure Overhead
Use simpler patterns
when possible (string methods often suffice)
Lesson 1740ReDoS and Security
Use the DOM's `EventTarget`
(different API: `addEventListener`, `dispatchEvent`)
Lesson 2423Node.js EventEmitter vs Custom Implementations
Use this sparingly
it defeats the purpose of having quality gates and should be documented in your commit message.
Lesson 2599Handling Hook Failures
Use WeakMap/WeakSet when
You're associating data with objects temporarily and want memory-efficient automatic cleanup.
Lesson 1064When to Use Weak vs Strong Collections
Use WeakMaps
when you need to add private data to objects you didn't create, or when working in environments that don't support private fields yet.
Lesson 798Private Fields vs WeakMap Pattern
Use when
Order doesn't matter and you want maximum concurrency (e.
Lesson 2134Flattening Operators
User actions
– JavaScript can detect when you click buttons, type in forms, or move your mouse
Lesson 4JavaScript in the Browser
User expectations
(research shows 3s load time is a common tolerance threshold)
Lesson 1932Setting Performance Budgets
User impact
Actions users perform repeatedly (search, navigation, form submission)
Lesson 1934Hot Paths and Critical User Journeys
User input validation
Always need to ask at least once
Lesson 341When to Use Do-While vs While
User interactions
become unresponsive
Lesson 1217Blocking the Event Loop
User navigation
A user clicks away while data is still loading
Lesson 2300Why AbortController Exists
User preferences
Object (string keys, JSON-friendly)
Lesson 1072Decision Framework: Choosing the Right Collection
User-facing labels
Displaying country names, language choices, or currency selectors to end users
Lesson 2246When to Use ListFormat and DisplayNames
Using `.then()` and `.catch()`
like a traditional Promise
Lesson 1334Async Functions Return Promises
Using `await`
inside another async function
Lesson 1334Async Functions Return Promises
Using Assignment in Conditions
(be cautious!
Lesson 252Common Assignment Patterns and Pitfalls
Using Promise.all
Pass all promises to `Promise.
Lesson 1307Parallel vs All: Performance Considerations
UTC milliseconds
(from `getTime()`).
Lesson 1641Comparing Dates Across Timezones
UTF-16 code unit
basically a number that represents that character in computer memory.
Lesson 37String: Sequences of Characters
UTF-8
encoding—the same format that `TextEncoder` uses by default.
Lesson 2347Creating a TextDecoder Instance
Utility functions
that work with the class concept (like `Math.
Lesson 789Static vs Instance: When to Use Each
Utility libraries and scripts
If you're writing a CLI tool or small package, JSDoc lets you publish plain `.
Lesson 2643Assessing Project Complexity and Team Size

V

Validate improvement
with numbers, not feelings
Lesson 1918Why Measurement Matters
Validate input length
before applying regex
Lesson 1740ReDoS and Security
Validate inputs
before the real method executes
Lesson 2072Method Decorators
Validate or transform
data before storing it
Lesson 658What Are Getters and Setters?
Validation overhead
Running the same checks multiple times
Lesson 1900Batch Operations vs Individual Updates
Variable assignments
If you write `let count = 0`, TypeScript infers `count` is a number.
Lesson 2623How @ts-check Uses Type Inference
Variable names remain meaningful
during step-through debugging
Lesson 2480Using Source Maps in Browser DevTools
Vendor code
you don't control
Lesson 2562The .eslintignore File
Verbosity
Result-based code requires more lines.
Lesson 2442Trade-offs: Verbosity vs Explicitness
Verdaccio
(self-hosted private registry), **GitHub Packages**, **JFrog Artifactory**, and regional mirrors.
Lesson 2496The NPM Registry and Alternatives
Verify Interactions
Mocks let you confirm that your code *called* a dependency correctly—with the right arguments, at the right time, the right number of times—without needing the real implementation.
Lesson 2694What is Mocking and Why Mock?
view
a window into a portion of the original Buffer's memory.
Lesson 1588Slicing BuffersLesson 2327Typed Array Methods: Set and Subarray
View the results
you'll see a detailed breakdown of all objects
Lesson 1885Taking a Heap Snapshot
Violates Single Responsibility Principle
Each class should have one clear purpose.
Lesson 1851God Objects: When One Class Does Everything
Visit nodejs.org
and you'll see two download options:
Lesson 2484Installing Node.js and NPM
Vite
strikes a middle ground here—lightning-fast development via esbuild, then Rollup for production with more optimization control.
Lesson 2463Comparing bundler performance characteristics
Vite's `rollup-plugin-visualizer`
works during production builds
Lesson 2473Verifying Tree Shaking Results
Vite's lightning-fast build tooling
.
Lesson 2656Vitest: The Modern Alternative
Vitest
is the modern challenger, designed for projects using Vite.
Lesson 2652The Test Runner Landscape
Vue
Not removing listeners added in `mounted` when `beforeUnmount` fires, or forgetting to unsubscribe from watchers.
Lesson 1881Memory Leak Patterns in Frameworks

W

Wait for processing
larger applications may take a few seconds
Lesson 1885Taking a Heap Snapshot
Walk through each line
of code chronologically
Lesson 1220Mental Model for Debugging Async
Wanted
The latest version that satisfies your `package.
Lesson 2493npm outdated and Version Checking
Wasted effort
Time spent optimizing code that wasn't slow to begin with
Lesson 1928Premature Optimization Is the Root of All Evil
Wasting time
on code that runs fast enough already
Lesson 1901The Danger of Premature Optimization
Watch out
`"10" < "9"` is `true` because string comparison happens character-by-character, not numerically!
Lesson 206Greater Than and Less Than
WeakMap
is a special collection similar to Map, but with strict limitations on what can be used as keys.
Lesson 1056WeakMap Basics and Key RestrictionsLesson 1831WeakMap for Private DataLesson 1880WeakMap and WeakSet as Solutions
WeakMap/WeakSet
when you're storing metadata *about* objects that should be cleaned up automatically when those objects are no longer needed.
Lesson 532Closures vs Weak References
WeakSet
is perfect when you need to keep track of *which objects* you've already seen or processed, but you don't want to prevent those objects from being cleaned up when they're no longer needed elsewhere in your code.
Lesson 1061WeakSet Use Case: Tracking Object SetsLesson 1880WeakMap and WeakSet as Solutions
Web Worker thread
runs heavy JavaScript tasks in the background
Lesson 2147What Are Web Workers?
Web Workers
solve this by running JavaScript in separate **background threads**.
Lesson 2147What Are Web Workers?Lesson 2191Main Thread Blocking and User Experience
Web.dev
(by Google) focuses on modern web platform features and best practices
Lesson 1495Where to Learn More About Web Development
WebKit integration
Tightly integrated with WebKit, Apple's browser rendering engine
Lesson 12JavaScriptCore: Safari's Engine
Webpack
offers an extensive plugin ecosystem and handles virtually any build requirement imaginable.
Lesson 2463Comparing bundler performance characteristics
Webpack Bundle Analyzer
creates an interactive treemap showing which modules and code ended up in your bundle
Lesson 2473Verifying Tree Shaking Results
WebRTC (Web Real-Time Communication)
enables peer-to-peer audio, video, and data sharing directly between browsers without requiring a server middleman.
Lesson 1494Web APIs Beyond the DOM
WebSocket data streams
in some implementations
Lesson 2027Built-in Async Iterables
Welsh
has separate plural rules for masculine and feminine nouns
Lesson 2228Understanding Pluralization Across Languages
What the vulnerability
allows attackers to do
Lesson 2507Audit and Security in Dependencies
What's the opportunity cost
Could those optimization hours be better spent on features users actually want?
Lesson 1935When Good Enough Is Actually Good Enough
What's your bundle budget
(tight → custom or micro-library like `fast-deep-equal`)
Lesson 2413When to Use Libraries vs Rolling Your Own
When it matters
For large modules in browsers, dynamic `import()` prevents blocking the main thread.
Lesson 1429Dynamic Import vs require()
When the response arrives
, the promise resolves with a `Response` object
Lesson 2255Your First Fetch Call
When to use
Open-source projects, internal tools, or when code protection isn't a concern.
Lesson 2481Source Maps in Production
When to Use Each
Modern JavaScript favors spread for its readability.
Lesson 978Object Spread vs Object.assign
Where's the bug
The chain is spread across multiple files with no clear execution path.
Lesson 2116When Observers Create Complexity
Whitelist known origins
Only accept messages from domains you explicitly trust
Lesson 2178Security: Validating Message Origins
Why
The IEEE 754 floating-point standard (which JavaScript follows) dictates that any operation producing an indeterminate result should never equal another indeterminate result.
Lesson 58Special Cases: NaN, -0, and +0Lesson 1211Common setTimeout Pitfalls
Why does `-0` exist
The floating-point standard includes it to preserve sign information in calculations near zero, useful in advanced scientific computing.
Lesson 58Special Cases: NaN, -0, and +0
Why the parentheses
Without them, JavaScript sees `{` and thinks you're starting a code block, not an object pattern.
Lesson 933Destructuring Without Declaration
Why this is wrong
The `async` function inside the executor *already* returns a Promise.
Lesson 1393Creating Promises Unnecessarily
Will juniors maintain this
Classes win on familiarity.
Lesson 1815Trade-offs and Maintainability
Will requirements change unpredictably
Mixins and factories adapt more gracefully than deep hierarchies.
Lesson 1815Trade-offs and Maintainability
Will requirements grow
(yes → library provides room to scale)
Lesson 2413When to Use Libraries vs Rolling Your Own
Window object
is the global browser environment.
Lesson 1490The DOM and Window as Browser-Specific APIs
Window resize complete
Recalculate layout only when resizing ends
Lesson 2390Debounce vs Throttle: When to Use Which
Window resize during
Update live preview while actively resizing
Lesson 2390Debounce vs Throttle: When to Use Which
Window resize handlers
Only recalculate layout once resizing stops.
Lesson 2383What Debounce Solves
Window resizing
Dragging a window corner fires dozens or hundreds of resize events per second.
Lesson 2383What Debounce Solves
With 'g' (global)
`match()` returns an array of **all matching strings**, but loses the extra details (no indices, no captured groups).
Lesson 166Global vs Non-Global Regex Matches
With `g`
It returns an array of *all matches* (no capture groups included!
Lesson 1722The Global Flag and Match Behavior
With a lockfile present
npm installs the *exact* versions recorded in the lockfile, ignoring the ranges (unless you explicitly update)
Lesson 2501Installing Exact vs Range Versions
With the `m` flag
`^` matches the start of any line, `$` matches the end of any line
Lesson 1691String Start and End: \A and \Z (Not in JS)
without
adding a newline character—it's purely for formatting your code, not the string's content.
Lesson 147Multi-line Strings with BackslashesLesson 596Trailing Commas and ReadabilityLesson 741Guarding Against Missing 'new'
Without 'g' (non-global)
`match()` returns an array with the **first match** plus extra details like the index and captured groups.
Lesson 166Global vs Non-Global Regex Matches
Without a lockfile
npm resolves the ranges freshly, picking the latest version that satisfies each range
Lesson 2501Installing Exact vs Range Versions
Without the `m` flag
`^` matches the start of the string, `$` matches the end of the string (exactly what `\A` and `\Z` do in other languages)
Lesson 1691String Start and End: \A and \Z (Not in JS)
Worker → Main thread
Use `parentPort.
Lesson 2165parentPort in Worker Scripts
Worker echoes the ID
back: `{ id, result }`
Lesson 2176Request-Response Patterns with PostMessage
Working with immutable patterns
where you never modify existing objects
Lesson 2395Why Deep Clone?
Working with large datasets
Avoid loading millions of items into memory at once
Lesson 1127When to Choose Lazy vs. Eager
Working with shared data
If multiple parts of your code reference the same array, mutation creates unpredictable side effects.
Lesson 837When to Prefer Non-Mutating Methods
Workspace settings
solve this by creating project-level configuration files that override individual editor preferences.
Lesson 2589Workspace Settings for Teams
Workspaces 2.0
Enhanced monorepo management
Lesson 2528Yarn Classic vs Yarn Berry (v2+)
Would clutter
your public interface if exposed
Lesson 1987Private Methods
Wrap the original method
to add before/after logic
Lesson 2072Method Decorators
Wrapping and rethrowing
means catching an error, creating a new error with additional information, and throwing that new error instead.
Lesson 1166Wrapping and Rethrowing Errors
Wraps
the primitive in a special object (a String, Number, or Boolean wrapper)
Lesson 43Primitive Wrapper Objects
Writable
(you send data), **Duplex** (both), and **Transform** (modify data as it flows).
Lesson 1548What Are Streams?Lesson 1550The Four Stream Types
Writable side
`write()`, `end()` methods, plus `'drain'` and `'finish'` events
Lesson 1561What Are Duplex Streams?
Writable streams
when all data has been flushed to the underlying system.
Lesson 1560Stream Events Reference
Write readable code first
Use composition where it clarifies intent.
Lesson 1786Performance Considerations
Writing callbacks
– Array methods (`.
Lesson 578When to Choose Arrow vs Regular Functions
Writing constructors
– Arrow functions cannot be used with `new` because they don't create their own `this` binding.
Lesson 578When to Choose Arrow vs Regular Functions
written
inside `first`, which is **written** in the global scope.
Lesson 492Lexical Scope is Determined at Parse TimeLesson 536Lexical Binding Explained
Wrong workspace
– Extensions may only activate when a `package.
Lesson 2592Troubleshooting Editor Integration Issues

X

XState
abstract away boilerplate, enforce structure, and add powerful features you'd otherwise have to reimplement.
Lesson 2433FSM Libraries: XState Overview

Y

Yarn
(both Classic and Berry) improved on npm's original speed through better parallelization and caching strategies.
Lesson 2534Performance Comparisons: Speed and Disk Usage
Yarn (Classic and Berry)
Very similar syntax to npm, also using the `"workspaces"` field.
Lesson 2549Workspaces in npm, Yarn, and pnpmLesson 2551Running Scripts Across Workspaces
Yarn Berry (2+)
introduced revolutionary concepts that break from decades of JavaScript convention.
Lesson 2528Yarn Classic vs Yarn Berry (v2+)
Yarn Berry (PnP)
No `node_modules` at all—dependencies live in a single `.
Lesson 2534Performance Comparisons: Speed and Disk Usage
Yarn Berry (v2+)
uses a different approach where you enable it per-project, but for now, Classic is simpler to start with.
Lesson 2529Installing and Using Yarn
Yarn Classic (1.x)
follows the traditional `node_modules` approach similar to npm, **Yarn Berry (2+)** introduced revolutionary concepts that break from decades of JavaScript convention.
Lesson 2528Yarn Classic vs Yarn Berry (v2+)
Yarn Classic (v1)
can be installed globally via NPM itself:
Lesson 2529Installing and Using Yarn
Yarn Workspaces
solve this by treating multiple packages as a unified project.
Lesson 2530Yarn Workspaces for Monorepos
Yield Control
JavaScript returns control to the caller, allowing other code to run
Lesson 1339Async Function Execution Model
You continue your day
You don't freeze in place waiting — you go about your business until they call back
Lesson 1221What is a Callback?
You have dynamic indices
When a variable might be positive or negative, `at()` handles both naturally
Lesson 1993at() vs Bracket Notation
You need else-if chains
When comparing multiple distinct conditions, else-if reads naturally:
Lesson 319When to Choose If/Else Over Alternatives
You need guaranteed uniqueness
– Set enforces this automatically
Lesson 1066Array vs Set: Handling Unique Values
You need negative indexing
`items.
Lesson 1993at() vs Bracket Notation
You need polymorphism
When multiple types share an interface (like different payment processors all implementing `processPayment()`), OOP patterns make swapping implementations clean.
Lesson 1859When to Use OOP vs Other Paradigms
You need precise control
over how operators or built-in methods treat your objects (`Symbol.
Lesson 1022When to Use Well-Known Symbols
You want flexible composition
– Object A needs mixins X and Y, Object B needs Y and Z, Object C needs only X
Lesson 1813When to Choose Mixins
You want lexical 'this'
– Any time you need `this` to refer to the enclosing scope rather than the call-site, arrows are your tool.
Lesson 578When to Choose Arrow vs Regular Functions
You're doing one-off operations
Creating a class for a single data transformation is over-engineering.
Lesson 1859When to Use OOP vs Other Paradigms
You're transforming data
Processing arrays, formatting strings, or computing values?
Lesson 1859When to Use OOP vs Other Paradigms
You're writing application code
, not reusable abstractions — most apps never need them
Lesson 1022When to Use Well-Known Symbols
Your object is simple
plain data objects rarely need custom behavior
Lesson 1022When to Use Well-Known Symbols

Z

Zero parameters
Parentheses **required** — `() => .
Lesson 395Parentheses in Arrow Function Parameters
Zero runtime overhead
comments are ignored during execution
Lesson 2609What JSDoc Is and Why It Matters
Zero-installs
Commit the cache to version control for instant setup
Lesson 2528Yarn Classic vs Yarn Berry (v2+)
Zipping
take one element from each iterable in turn, pairing them together until one runs out.
Lesson 1094Combining Multiple Iterators
Zod schemas
at the boundaries where data enters your application—API responses, form submissions, file uploads.
Lesson 2650The Pragmatic Middle Ground