liveBook · Manning

Undefined

In JavaScript, undefined is a primitive value that indicates a value is missing, unassigned, or unavailable.

How 2 Manning books explain it

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.

Read how JavaScript in Depth explains undefined →

Also covered in

What to know first

Related concepts

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.