Can somebody explain to me how can a boolean have a value other than true or false in ruby? Truthies and falsies I mean. | SoloLearn: Learn to code for FREE!

0

Can somebody explain to me how can a boolean have a value other than true or false in ruby? Truthies and falsies I mean.

I mean how can you attribute a value other than true or false to something that can have a value just as true or false. I have no examples to this. I want to see just how it works

4/15/2020 6:13:34 PM

Einstein Shilly shally

1 Answer

New Answer

0

Truthy and falsy are just true or false. A boolean expects always true or false. If you assign, for example, "hello" to a boolean, it will be taken as truthy (true).