JS Built-ins
Booleanbeginner

Boolean() β€” non-empty string is truthy

πŸ“– Usage Example
Boolean('hello')  // β†’ true
Boolean('0')     // β†’ true

Any non-empty stringβ€”even '0' or 'false'β€”is truthy.

Boolean('hello')

Any non-empty string is truthy β€” Boolean('hello') returns true.

Challenge: Verify that Boolean('hello') is true.

πŸ’‘ Hints (1)
  • β€’ Any non-empty string is truthy β€” even '0' or 'false'.