Course contentsShow
← JavaScript
Lesson 196 of 2,7236. Booleans and ConditionalsFree lesson

Falsy Values: The Complete List

Memorizing the six falsy values: false, 0, empty string, null, undefined, and NaN.

Falsy Values: The Complete List

You'll learn the exact six values in JavaScript that are treated as false in boolean contexts.

The Six Falsy Values

In JavaScript, there are exactly six values that evaluate to false when converted to a boolean. Every other value is truthy. This is a fixed list worth memorizing:

  1. false — the boolean literal itself
  2. 0 — the number zero (also -0)
  3. "" — the empty string (also '' or ``)
  4. null — represents intentional absence of value
  5. undefined — uninitialized or missing value
  6. NaN — Not a Number (result of invalid math)

Why This Matters

When you use values in conditional contexts (like if statements), JavaScript automatically converts them to booleans. Knowing these six falsy values means you know when something will behave as false.

// All of these will NOT execute the console.log:
if (false) { console.log("Won't run"); }
if (0) { console.log("Won't run"); }
if ("") { console.log("Won't run"); }
if (null) { console.log("Won't run"); }
if (undefined) { console.log("Won't run"); }
if (NaN) { console.log("Won't run"); }

Memory Trick

Think of it as "F-0-E-N-U-N": False, 0, Empty string, Null, Undefined, NaN.

Everything else—including "0", "false", empty arrays [], and empty objects {}—is truthy!

Key Takeaway: JavaScript has exactly six falsy values: false, 0, "" (empty string), null, undefined, and NaN. Memorize this list—it's fundamental to understanding boolean conversion.