W3cubDocs

/Crystal

Truthy and falsey values

A truthy value is a value that is considered true for an if, unless, while or until guard. A falsey value is a value that is considered false in those places.

The only falsey values are nil, false and null pointers (pointers whose memory address is zero). Any other value is truthy.

To the extent possible under law, the persons who contributed to this workhave waived
all copyright and related or neighboring rights to this workby associating CC0 with it.
https://crystal-lang.org/docs/syntax_and_semantics/truthy_and_falsey_values.html