Missing JavaScript Terms — AI Knowledge-Base Gap Analysis

Purpose of this file. The current curriculum in terms/level_01terms/level_10 defines 117 terms (see _meta/javascript_terms_zero_to_hero.md). Reviewing it as a junior engineer trying to learn JavaScript from these files alone, I hit gaps: concepts that the existing docs use, assume, or reference in prose but never define as their own term. This file catalogs those gaps so an AI can generate the missing term docs and make the knowledge base self-contained.

How to read this file.

  • Section 1 — the critical gaps (concepts used everywhere but never taught).
  • Section 2 — the full list of missing terms, grouped by the level they belong to. Each row is shaped to drop straight into the term-doc template: it names the prerequisites and related terms so the ## 1. Prerequisites and ## 7. Related Terms sections can be filled in automatically.
  • Section 3 — the relationship map (dependency graph) between missing terms and existing terms.
  • Section 4 — suggested generation priority.

Evidence method. "Gap" = concept appears in prose/code of ≥1 existing term file but has no dedicated terms/level_XX/<term>.md. Counts below are files that mention the concept (found via grep -rl across terms/).


1. Critical Gaps (used pervasively, never defined)

These block comprehension the most because existing lessons rely on them without explanation.

GapEvidence (files mentioning it)Why it blocks learning
Strict vs Loose Equality (=== / ==)=== in ~29 files; technology_context.md mandates ===The most-used operator in every code sample is never defined. A learner sees === everywhere but no doc explains why not ==, or what coercion == triggers.
Error Handling (try / catch / finally)try in ~43 files, catch in ~11, throw in ~31; technology_context.md requires try...catch in async codeThe guidelines demand error handling, and .catch() (Term #72) implies rejection handling, but the try/catch/finally statement and the throw mechanism are never taught.
Error object & error typesreferenced alongside throw/catchTypeError, RangeError, custom errors, and error.message are used in examples but undefined.
Timers (setTimeout / setInterval / clearTimeout)setTimeout in ~13 files, setInterval in ~3The Macrotask Queue (Term #76), Debounce (#106), and Throttle (#107) docs all depend on setTimeout, yet it has no term of its own.
JSON / JSON.stringify / JSON.parse~7 filesFundamental for fetch responses (Term #74) and data handling; used but never defined.
Reference vs Value (copy semantics)implied across Object/Array/closure docsJunior devs' #1 confusion. Objects/arrays are "copied by reference"; primitives "by value" — assumed by spread, Object.assign, closures, but never stated.
window / document / BOMwindow in ~19 filesThe DOM docs assume a global window/document host object; the Browser Object Model is never introduced.
Comparison operators (>, <, >=, <=) & arithmetic operators (+ - * / %)used in nearly every loop/conditionLoops and if conditions rely on operators that have no foundational term.

2. Missing Terms by Level

Legend for Category: Language Core / Browser API / DOM / Ecosystem / Tooling (per technology_context.md). Prereqs and Related reference existing terms by name (see zero-to-hero list) or other missing terms (marked with 🆕).

Level 1 — Foundations (operators & number model)

Proposed TermOne-line descriptionCategoryPrerequisitesRelated
Operator [DONE]Symbol that performs an operation on operands (umbrella concept).Language CoreExpression, StatementArithmetic/Comparison/Assignment Operators
Arithmetic Operators [DONE]+ - * / % ** for math on numbers.Language CoreNumber, OperatorType Coercion, NaN
Assignment Operators [DONE]=, +=, -=, *=, … store/update values.Language CoreVariable, Operatorlet, const
Comparison Operators [DONE]> < >= <= compare two values, yielding a Boolean.Language CoreBoolean, OperatorStrict/Loose Equality, if/else
Strict vs Loose Equality (=== vs ==) [DONE]Identity comparison with/without type coercion; !==/!=.Language CoreType Coercion, BooleanComparison Operators, Truthy/Falsy, NaN
Increment / Decrement (++ / --) [DONE]Add/subtract one; prefix vs postfix.Language CoreNumber, Variablefor Loop, Arithmetic Operators
Ternary / Conditional Operator (? :) [DONE]Inline one-expression if/else.Language Coreif/else, ExpressionTruthy/Falsy, Logical Operators
Operator Precedence & Associativity [DONE]The order operators evaluate in an expression.Language CoreOperator, ExpressionArithmetic Operators
NaN [DONE]"Not-a-Number"; result of invalid math; not equal to itself.Language CoreNumber, Type CoercionStrict Equality, parseInt
Infinity / -Infinity [DONE]Numeric value beyond the max representable number.Language CoreNumberNaN, Arithmetic Operators
BigInt [DONE]Primitive for arbitrarily large integers (123n).Language CoreNumber, Primitive Typestypeof
Dynamic & Weak Typing [DONE]Types attach to values at runtime; JS auto-coerces.Language CoreType Coercion, typeofPrimitive Types, TypeScript
Automatic Semicolon Insertion (ASI) [DONE]How/when JS inserts missing semicolons; pitfalls.Language CoreStatementcomments

Level 2 — Control Flow, Built-in Objects & Data Access

Proposed TermOne-line descriptionCategoryPrerequisitesRelated
break / continue [DONE]Exit a loop early / skip to next iteration.Language Corefor Loop, while Loopswitch, 🆕 Labeled Statements
Property Access (dot vs bracket notation) [DONE]obj.key vs obj["key"]; dynamic keys.Language CoreObject, Property🆕 Computed Property Names, Method
Array Index & .length [DONE]Zero-based positional access and size of an array.Language CoreArrayfor Loop, 🆕 Array mutating methods
String Methods [DONE]slice, split, toUpperCase, includes, trim, …Language CoreStringTemplate Literals, 🆕 Array Methods
Number Methods & Parsing [DONE]parseInt, parseFloat, toFixed, Number().Language CoreNumber, Type CoercionNaN, Math object
Math object [DONE]Built-in math utilities (round, random, max…).Language CoreNumberNumber Methods
Date object [DONE]Representing and manipulating dates/times.Language CoreObject🆕 Timers, JSON

Level 3 — Functions & Scope

Proposed TermOne-line descriptionCategoryPrerequisitesRelated
Recursion [DONE]A function that calls itself until a base case.Language CoreFunction, return Statement, Call StackHigher-Order Function, 🆕 Tail Call Optimization
Lexical (Static) Scope / Environment [DONE]Scope determined by where code is written, not called.Language CoreScope, Block ScopeClosure, Hoisting, Arrow Function
Pure Function & Side Effects [DONE]Output depends only on input; no external mutation.Language CoreFunction, parameters🆕 Immutability, 🆕 Functional Programming
Anonymous Function [DONE]A function without a name (often a callback/expression).Language CoreFunction Expression, Callback FunctionArrow Function, IIFE
call / apply / bind [DONE] (relocated to Level 7)Explicitly set a function's this and arguments.Language CoreFunction, Argumentsthis Keyword, Reference vs Value
Default this Binding Rules [DONE] (relocated to Level 7)Implicit/explicit/new/arrow rules for this.Language Corethis Keywordcall/apply/bind, Arrow Function, new Keyword

Level 4 — Array Methods (beyond iteration helpers)

Proposed TermOne-line descriptionCategoryPrerequisitesRelated
Mutating vs Non-mutating Methods [DONE]Which array methods change the original vs return new.Language CoreArray, 🆕 Reference vs Value🆕 Immutability, Spread Syntax
push / pop / shift / unshift [DONE]Add/remove at the end/start of an array (mutating).Language CoreArray, Array Index & lengthMutating vs Non-mutating
slice / splice [DONE]Copy a sub-array (pure) vs insert/remove in place (mutating).Language CoreArray, Array Indexpush/pop, Spread Syntax
concat / join / split [DONE]Merge arrays / array→string / string→array.Language CoreArray, StringSpread Syntax, String Methods
indexOf / includes / findIndex [DONE]Search for elements/positions in an array.Language CoreArray, Strict Equalityfind, some
sort / reverse [DONE]Order elements (with comparator) / reverse order.Language CoreArray, Callback FunctionComparison Operators
flat / flatMap [DONE]Flatten nested arrays / map-then-flatten.Language CoreArray, mapreduce
Array.from / Array.of / Array.isArray [DONE]Create arrays from iterables/args; type-check.Language CoreArray, 🆕 IterablesSpread Syntax, Set
Method Chaining [DONE]Calling array methods in sequence (.filter().map()…).Language Coremap, filter, reducePure Function

Level 5 — DOM & Browser Environment

Proposed TermOne-line descriptionCategoryPrerequisitesRelated
window object / BOM [DONE]The browser global object hosting timers, location, etc.Browser API / DOMGlobal Scope, JavaScript EngineDOM, document object, Web Storage
document object [DONE]Entry point to the DOM tree for a page.Browser API / DOMDOM, Node, window objectdocument.querySelector
querySelectorAll & NodeList [DONE]Select all matching elements; iterate a NodeList.Browser API / DOMdocument.querySelectorfor…of, forEach
getElementById / getElementsByClassName [DONE]Legacy element selection APIs.Browser API / DOMDOM, Nodedocument.querySelector
DOM Manipulation (createElement, appendChild, remove) [DONE]Create/insert/delete nodes dynamically.Browser API / DOMDOM, Node, document objectinnerHTML/textContent
innerHTML / textContent / innerText [DONE]Read/write element content (HTML vs text).Browser API / DOMNode, DOM Manipulation🆕 XSS safety
classList & setAttribute/getAttribute [DONE]Modify element classes and attributes.Browser API / DOMNodeDOM Manipulation
Event object [DONE]The object passed to listeners (target, type, key).Browser API / DOMEvent, Event Listenerevent.target vs currentTarget, Event Delegation
event.target vs event.currentTarget [DONE]Element that fired vs element the listener is on.Browser API / DOMEvent object, Event DelegationEvent Bubbling
DOM Traversal [DONE]parentNode, children, nextSibling, closest.Browser API / DOMDOM, NodeEvent Delegation
Web Storage (localStorage / sessionStorage) [DONE]Persist key/value string data in the browser.Browser API / DOMwindow object, 🆕 JSON🆕 Cookies
Timers (setTimeout / setInterval / clearTimeout) [DONE]Schedule deferred/repeated callbacks.Browser API / DOMCallback Function, window objectMacrotask Queue, Debounce, Throttle, Event Loop
DOMContentLoaded / load events [DONE]Lifecycle events for when the page/DOM is ready.Browser API / DOMEvent, Event Listenerdocument object

Level 6 — Asynchronous JavaScript

Proposed TermOne-line descriptionCategoryPrerequisitesRelated
Promise.all / allSettled / race / any [DONE]Combinators for running promises in parallel.Language CorePromise, then/catchFetch API, async/await
Promise.resolve / Promise.reject [DONE]Create already-settled promises.Language CorePromisethen/catch, Promise.all
Promise Chaining [DONE]Sequencing .then() calls; returning values/promises.Language CorePromise, then/catchCallback Hell, async/await
try/catch with async/await [DONE]Error handling for awaited promises.Language Coreasync/await, Error Handlingthen/catch, Fetch API
for await...of / Async Iterators [DONE]Iterating over asynchronously produced values.Language Coreasync/await, 🆕 Iterators & IterablesGenerator, for…of
AbortController [DONE]Cancel in-flight fetches/async operations.Browser API / DOMFetch API, Event objectPromise
Web Workers [DONE]Run scripts on background threads.Browser API / DOMAsynchronous, Call StackEvent Loop, window object

Level 7 — Objects & Prototypes

Proposed TermOne-line descriptionCategoryPrerequisitesRelated
Reference vs Value (copy semantics) [DONE]Primitives copy by value; objects/arrays by reference.Language CorePrimitive Types, ObjectClosure, Spread Syntax, Shallow/Deep Copy
Shallow Copy vs Deep Copy [DONE]Copying top-level vs fully nested structures.Language CoreReference vs Value, ObjectSpread Syntax, Object.assign, JSON, 🆕 structuredClone
JSON / JSON.stringify / JSON.parse [DONE]Serialize/parse the JSON data-interchange format.Language CoreObject, Array, StringFetch API, Web Storage, Deep Copy
Object.assign [DONE]Copy own enumerable props into a target object.Language CoreObject, Reference vs ValueSpread Syntax, Shallow Copy
Object.freeze / Object.seal [DONE]Make objects immutable / non-extensible.Language CoreObject🆕 Immutability, const
Object.create [DONE]Create an object with an explicit prototype.Language CoreObject, PrototypePrototypal Inheritance, new Keyword
hasOwnProperty / Object.getPrototypeOf [DONE]Distinguish own vs inherited properties.Language CoreObject, Prototype Chainfor…in, Prototypal Inheritance
Getters & Setters [DONE]Accessor properties (get/set) that run on access.Language CoreObject, Property, MethodClass, Computed Property Names
Computed Property Names [DONE]Dynamic object keys via { [expr]: value }.Language CoreObject, Property AccessSymbol, Template Literals
Shorthand Properties & Methods [DONE]{ x } and { method() {} } object shorthands.Language CoreObject, Property, MethodDestructuring
instanceof [DONE]Test whether an object is built from a constructor.Language Corenew Keyword, Prototype ChainClass, typeof, constructor Function
Static Methods & Properties [DONE]Class members on the class itself, not instances.Language CoreClassextends, new Keyword
Private Class Fields (#) [DONE]Truly private members inside a class.Language CoreClass, ClosureGetters & Setters
call / apply / bind [DONE]Explicitly set a function's this and arguments.Language CoreFunction, Argumentsthis Keyword, Reference vs Value
Default this Binding Rules [DONE]Implicit/explicit/new/arrow rules for this.Language Corethis Keywordcall/apply/bind, Arrow Function, new Keyword

Level 8 — Modern JavaScript (ES6+)

Proposed TermOne-line descriptionCategoryPrerequisitesRelated
Iterators & Iterables (protocol) [DONE]The [Symbol.iterator]() / next() contract.Language CoreObject, Symbolfor…of, Generator, Spread Syntax, Array.from
WeakMap / WeakSet [DONE]Collections with garbage-collectable keys.Language CoreMap, Set, Garbage CollectionReference vs Value
Named vs Default Exports [DONE]Two module export styles and their import syntax.Language CoreModulesDynamic import, CommonJS vs ESM
Dynamic import() [DONE]Load modules on demand, returning a Promise.Language CoreModules, PromiseBundler, Code Splitting
Tagged Template Literals [DONE]Functions that process template literal parts.Language CoreTemplate Literals, FunctionString Methods
**Logical Assignment (??=, `=, &&=`)** [DONE]Combine logical ops with assignment.Language Core
globalThis [DONE]Standard reference to the global object anywhere.Language CoreGlobal Scopewindow object, Node.js

Level 9 — Advanced Concepts & Patterns

Proposed TermOne-line descriptionCategoryPrerequisitesRelated
Error Handling (try/catch/finally) [DONE]Structured exception handling flow.Language CoreStatement, Functionthrow, Error object, async/await
throw statement [DONE]Raise an exception to unwind the call stack.Language CoreError HandlingError object, Call Stack
Error object & Error Types [DONE]Error, TypeError, RangeError, custom errors.Language Corethrow, Class (extends)Error Handling
Regular Expressions (RegExp) [DONE]Pattern matching for strings.Language CoreString, String Methodsform validation
Immutability [DONE]Never mutating data; producing new copies instead.Language CoreReference vs Value, Object.freezePure Function, Spread Syntax
Functional Programming & Composition [DONE]Composing pure functions; compose/pipe.Language CoreHigher-Order Function, Pure FunctionCurrying, Partial Application
Partial Application [DONE]Fixing some arguments of a function.Language CoreClosure, call/apply/bindCurrying, Higher-Order Function
Design Patterns (Module, Singleton, Observer, Factory) [DONE]Reusable solution templates in JS.Language CoreClosure, IIFE, ObjectEvent Emitter
structuredClone [DONE]Built-in deep-cloning API.Language CoreDeep CopyJSON, Reference vs Value
Reflect [DONE]Methods mirroring Proxy trap operations.Language CoreProxy, Objectinstanceof

Level 10 — Ecosystem & Tooling

Proposed TermOne-line descriptionCategoryPrerequisitesRelated
Runtime vs Compile Time [DONE]When code is checked/transformed vs executed.Ecosystem / ToolingJavaScript EngineBabel, TypeScript, Transpiler
Transpiler vs Compiler [DONE]Source-to-source vs source-to-machine translation.Ecosystem / ToolingBabelTypeScript, Polyfill
CommonJS vs ES Modules (require vs import) [DONE]Node's legacy module system vs the ES standard.Ecosystem / ToolingModules, Node.jspackage.json, Bundler
Specific Bundlers (Webpack / Vite / Rollup / esbuild) [DONE]Concrete bundling tools and their trade-offs.Ecosystem / ToolingBundler, ModulesTree Shaking, Dev Server
Tree Shaking & Code Splitting [DONE]Removing dead code / lazy-loading bundles.Ecosystem / ToolingBundler, ModulesDynamic import, Minification
Minification & Source Maps [DONE]Shrinking code; mapping bundles back to source.Ecosystem / ToolingBundlerBabel
Linter (ESLint) & Formatter (Prettier) [DONE]Static analysis and auto-formatting tools.Ecosystem / ToolingEcosystem basicsStrict Mode, TypeScript
Semantic Versioning & Lockfiles [DONE]^/~ ranges and package-lock.json.Ecosystem / Toolingnpm, package.jsonCommonJS vs ESM
Alternative Runtimes (Deno / Bun) [DONE]Modern JS/TS runtimes beyond Node.js.Ecosystem / ToolingNode.jsTypeScript, globalThis
Browser DevTools & Debugging [DONE]Inspecting, breakpoints, debugger, profiling.Ecosystem / Toolingconsole.log, JavaScript EngineError object
Unit Testing (Jest / Vitest) [DONE]Automated test runners and assertions.Ecosystem / ToolingFunction, npmPure Function
Framework vs Library (React / Vue / Angular) [DONE]Inversion-of-control distinction; where JSX fits.Ecosystem / ToolingSPA, JSXBundler, CommonJS vs ESM
Web APIs vs the Language [DONE]Distinguishing engine (ECMAScript) from host APIs.Ecosystem / ToolingJavaScript Engine, ECMAScriptwindow object, DOM

3. Relationship Map (dependency graph)

How the missing terms connect to each other and to existing terms. A → B means "understanding A meaningfully requires B" (B is a prerequisite of A).

3.1 Foundational chains (unblock the most downstream terms)

Type Coercion (exists)
   → Strict vs Loose Equality (===/==)  🆕
        → Comparison Operators 🆕 → if/else, while, for (exist)
        → NaN 🆕 → Number Methods/parseInt 🆕
   → Dynamic & Weak Typing 🆕 → TypeScript (exists)

Primitive Types + Object (exist)
   → Reference vs Value 🆕   ← THE keystone gap
        → Shallow vs Deep Copy 🆕
             → Object.assign 🆕, Spread Syntax (exists), JSON 🆕, structuredClone 🆕
        → Immutability 🆕 → Object.freeze 🆕, Pure Function 🆕
        → Mutating vs Non-mutating array methods 🆕
        → call/apply/bind 🆕 (this rebinding), WeakMap/WeakSet 🆕

3.2 Error-handling cluster (currently absent, referenced ~43 files)

throw 🆕 → Error object & types 🆕 → Error Handling (try/catch/finally) 🆕
Error Handling 🆕 ⇄ async/await (exists), Fetch API (exists)   [try/catch with await 🆕]
Error Handling 🆕 → Promise.catch / then-catch (exists)         [same concept, two syntaxes]

3.3 Timers & async cluster

Callback Function (exists) + window 🆕
   → Timers: setTimeout/setInterval 🆕
        → Macrotask Queue (exists)   [setTimeout is THE canonical macrotask]
        → Debounce (exists), Throttle (exists)   [both built on setTimeout]
Promise (exists)
   → Promise chaining 🆕 → Promise.all/race/allSettled/any 🆕
   → async iterators / for await...of 🆕 ← Iterators & Iterables 🆕

3.4 DOM & browser cluster

JavaScript Engine + Global Scope (exist)
   → window / BOM 🆕 → document object 🆕
        → querySelectorAll 🆕, getElementById 🆕  (siblings of existing querySelector)
        → DOM Manipulation 🆕 → innerHTML/textContent 🆕, classList/setAttribute 🆕
        → Web Storage (localStorage) 🆕  ← needs JSON 🆕
        → Timers 🆕, Web Workers 🆕
Event (exists)
   → Event object 🆕 → event.target vs currentTarget 🆕
        → Event Delegation (exists), Event Bubbling (exists)  [both need Event object props]

3.5 Objects/OOP cluster

Prototype / Prototype Chain (exist)
   → Object.create 🆕, hasOwnProperty/getPrototypeOf 🆕, instanceof 🆕
Class (exists)
   → Static Methods 🆕, Private Fields (#) 🆕, Getters & Setters 🆕
   → Error types 🆕 (custom errors extend Error)
Object + Property (exist)
   → Property Access dot/bracket 🆕 → Computed Property Names 🆕
   → Shorthand Properties/Methods 🆕 (pairs with Destructuring, exists)

3.6 Functional cluster

Higher-Order Function (exists) + Pure Function 🆕
   → Functional Programming & Composition 🆕
        → Currying (exists), Partial Application 🆕
Closure (exists) → Lexical Scope 🆕 (should arguably PRECEDE closure)
   → call/apply/bind 🆕, Partial Application 🆕, Private Fields 🆕
Recursion 🆕 → Call Stack (exists)   [stack overflow demo], Tail Call Optimization

3.7 Tooling cluster

Babel (exists) → Runtime vs Compile Time 🆕 → Transpiler vs Compiler 🆕 → Polyfill (exists)
Modules (exists) → CommonJS vs ESM 🆕 → Named/Default Exports 🆕, Dynamic import 🆕
Bundler (exists) → Webpack/Vite/Rollup 🆕 → Tree Shaking 🆕, Minification/Source Maps 🆕
npm + package.json (exist) → Semantic Versioning & Lockfiles 🆕
SPA + JSX (exist) → Framework vs Library 🆕 → Unit Testing 🆕, DevTools 🆕

4. Suggested Generation Priority

Ordered so each batch unblocks the next (and repairs the most existing prose references).

TierRationaleTerms
P0 — Repairs pervasive referencesUsed in existing docs but undefinedStrict vs Loose Equality; Error Handling (try/catch/finally); throw; Error object & types; Timers (setTimeout/setInterval); JSON; window/BOM; Comparison & Arithmetic Operators
P1 — Keystone mental modelsUnblock many downstream termsReference vs Value; Shallow vs Deep Copy; Lexical Scope; Recursion; Ternary Operator; document object; Event object
P2 — Core breadth (daily use)Round out everyday fluencyArray mutating/search/sort methods; String/Number/Math/Date methods; call/apply/bind; DOM Manipulation; querySelectorAll; Promise combinators; Web Storage; instanceof; Object.assign/freeze/create; Getters/Setters
P3 — Modern & advancedDeepen ES6+ and patternsIterators & Iterables; WeakMap/WeakSet; Logical Assignment; Tagged Templates; Named/Default Exports + Dynamic import; RegExp; Immutability; Functional Composition; Partial Application; Design Patterns; Reflect; structuredClone; async iterators; AbortController; Web Workers; Static/Private class members
P4 — Ecosystem literacyProfessional contextCommonJS vs ESM; Runtime vs Compile Time; Transpiler vs Compiler; specific bundlers; Tree Shaking/Minification/Source Maps; ESLint/Prettier; SemVer/lockfiles; Deno/Bun; DevTools; Unit Testing; Framework vs Library; Web APIs vs language; globalThis

5. Notes for the Generating AI

  • Follow the existing template. Every new file must mirror the 8-section structure used in terms/level_XX/*.md (Prerequisites → Term Category → Environment Context → Explanation [Design Motivation / Reality Metaphor / Code Examples] → Common Mistakes → Practice Exercises → Related Terms → Key Takeaways) and obey _meta/technology_context.md (TC39 storytelling persona; const-first, ===-only, semicolons, try/catch in async code).
  • Wire the cross-links. Use the Prerequisites and Related columns in Section 2 to populate ## 1. Prerequisites and ## 7. Related Terms with correct relative paths (../level_XX/<term>.md). When a new term links to another new term, create both.
  • Renumber intentionally. The zero-to-hero list ends at #117; either append new numbers or switch to level-relative numbering — decide once and stay consistent.
  • Update the trackers. After generating, add each new term to _meta/javascript_terms_zero_to_hero.md and remove it from this gap list (or mark it done), mirroring how _meta/missing_terms.md records already-closed gaps.
  • Environment tags. DOM/BOM/Web Storage/Timers/Workers = Browser Only; require/CommonJS and most tooling = Node.js / Server Only; language-core terms = Universal.
Built with LogoFlowershow