Learn JavaScript
Advanced JavaScript
25.8
Lesson

Truthy or Falsy Values

There are 7 falsy values in JavaScript:

  • Number 0

  • BigInt 0n

  • null

  • undefined

  • NaN

  • empty string: ""

  • Boolean false


Some of these values are new to you. We’ll cover them later. Just remember, all the values except the falsy values are truthy values.

Falsy value

Boolean() returns false if it has any one of the “falsy” values.

Truthy value

Boolean() returns true if it is given a “truthy” value.