Undefined
In JavaScript, undefined is a primitive value that indicates a value is missing, unassigned, or unavailable.
Essential TypeScript 5, Third Edition
undefined is the JavaScript primitive value that indicates that a value has not been assigned or is unavailable.
- How it is used
- Identifies unassigned variables and missing object properties so code can provide fallbacks or guard access.
- How deep it goes
- Works through variable output, object-property access, and fallback operators; addresses TypeScript checking without exploring runtime implementation.
- Examples
- Tests an unassigned variable, a zero tax rate, and a potentially missing object property in `index.ts` and `index.js`.
- What you can do after
- Operate/configure it with `strictNullChecks`, and guard missing values with `??` or optional chaining.
Read how Essential TypeScript 5, Third Edition explains undefined →
JavaScript in Depth
A special JavaScript value representing the absence of an assigned value or a missing result.
- How it is used
- Marks values that remain unassigned, omitted, nonexistent, or unreturned, while distinguishing them from deliberate emptiness.
- How deep it goes
- Explains semantic conventions, falsiness, equality checks, and one runtime-specific representation, but does not develop coercion internals.
- Examples
- Uses object properties, value classification, omitted results, and constructor calls to expose undefined behavior.
- What you can do after
- Diagnose/debug with it by distinguishing unset data from intentional emptiness and choosing appropriate equality checks.
Also covered in
What to know first
- JavaScriptJavaScript is a high-level, dynamically typed programming language standardized as ECMAScript and used for web and general-purpose programming.
- functionA function is a callable unit of program code that performs a computation or operation, can accept inputs, and may produce a result or side effect.
- TypeScriptTypeScript is a statically typed superset of JavaScript that adds type-system features and is compiled to JavaScript.
Related concepts
- primitive typekind of · A primitive type is a predefined basic data type representing a simple value rather than a composite structure of multiple values or fields.
- union typeused by · A union type is a type whose values can represent one of several specified alternative types or variants.
- missing valuecontrasts with · A missing value is an expected data value or observation that is absent, unavailable, unknown, or inapplicable.
- default valueaddressed by · A default value is a predefined value automatically applied when no explicit value is supplied or specified.
- JavaScriptused by · JavaScript is a high-level, dynamically typed programming language standardized as ECMAScript and used for web and general-purpose programming.
Questions about undefined
What is undefined?
In JavaScript, undefined is a primitive value that indicates a value is missing, unassigned, or unavailable.
Which Manning books explain undefined?
Essential TypeScript 5, Third Edition and JavaScript in Depth.
What should I know before learning undefined?
Manning books that teach undefined usually introduce JavaScript, function and TypeScript first.
What is the difference between undefined and missing value?
In JavaScript, undefined is a primitive value that indicates a value is missing, unassigned, or unavailable. A missing value is an expected data value or observation that is absent, unavailable, unknown, or inapplicable.
What is undefined a kind of?
Undefined is a kind of primitive type. A primitive type is a predefined basic data type representing a simple value rather than a composite structure of multiple values or fields.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

