Comparison Operators and Expressions : Comparison Operators « Language Basics « Ruby






Comparison Operators and Expressions



age = 10
puts "You're too young to use this system" if age < 18

 








Related examples in the same category

1.A Full List of Number Comparison Operators in Ruby
2.Comparable module uses the <=> operator on the class that includes it.
3.Equality, Less Than, or Greater Than
4.The == and eql? return true or false