Truthy and Falsy

Truthy Falsy
πŸ‘¨β€πŸ’Ό Nice work! You just used truthy and falsy values to build boolean logic without writing explicit comparisons.
πŸ¦‰ Remember: a boolean can be created from any value:
const isPresent = Boolean(value)
const alsoBoolean = !!value
This is useful when you care about "has a value" rather than the specific value. We'll rely on this pattern a lot when we get into control flow.

Please set the playground first

Loading "Truthy and Falsy"
Loading "Truthy and Falsy"