Truthy and Falsy (Ruby)
In Ruby only nil and false are falsy; every other value — including 0, "", and [] — is truthy. This simple rule governs how all conditionals behave.
In Ruby only nil and false are falsy; every other value — including 0, "", and [] — is truthy. This simple rule governs how all conditionals behave.