According to the literature I have been reading online, everything evaluates to true in Ruby except false and nil. I am trying to find out what benefits this may have? Thanks
I will sum this advantage up in checking if the user input a value.
PHP:
if($somevalue !== null) { # '' and '0' are falsy.
Ruby:
if somevalue
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With