Utilizor
Contact Us

Truthy & Falsy

Values that evaluate to true or false.

Truthy & Falsy

Everything with a "Value" is True.

Everything without a "Value" is False.

The following values are Falsy:

  • 0
  • -0
  • "" (Empty string)
  • undefined
  • null
  • false
  • NaN

Example

if ("") {
  // This block will not execute
}