Go Back

comparison

Getting to Know Ruby: Day 3

August 22, 2020
ruby
basics
conditionals
comparison

Alright time for some conditionals! But before that we need to get a few things down. true,false and nil true, false and nil are like everything else in ruby are objects that have their own classes in which they are the only objects. true and false are both native boolean values. You could set it to variables, use it for methods and what not. irb(main):001:0> true.class => TrueClass irb(main):002:0> false.