Description

In JavaScript, a truthy value is a value that is considered true when encountered in a Boolean context.

 

All values are truthy unless they are defined as falsy.

 

That is, all values are truthy except

  • false,
  • 0,
  • -0,
  • 0n,
  • "",
  • null,
  • undefined,
  • NaN.