A value is either truthy or falsy depending on how it is evaluated in a Boolean context. Falsy means false-like and truthy means true-like. Essentially, they are values that are coerced to
false when performing certain operations.
Every other value is considered truthy.
A value’s truthiness can be examined by passing it into the
Boolean("") // false Boolean() // true
There is a shortcut for this using the logical NOT
! operator. Using
! once will convert a value to its inverse boolean equivalent (i.e. not false is true), and
! once more will convert back, thus effectively converting the value to a boolean.