In Ruby, there are two Boolean values: true and false.
isOnline = true
userIsAdmin = false
If you try to evaluate a value other than true or false as a Boolean, Ruby will automatically treat it as a Boolean.
When this is done, a non-Boolean value that evaluates to true is called “truthy” and a non-Boolean value that evaluates to false is called “falsey“.
In Ruby only false and nil are falsey. Everything else is truthy (even 0 is truthy).
CLICK ON THE BUTTON BELOW TO GO TO THE RUBY MAIN COURSE PAGE.
© License: All Rights Reserved
CONTACT HOLLA TECH – LEARN SUPPORT