Conditionals

Conditional statements evaluate as either true or false.

Conditional statements

Ruby has neat methods like .nil? and .blank? which evaluate an object based on a condition, and return a boolean.

if state != 'California'
  print "A different state was selected"

This statement can be re-written using unless.

unless state == 'California'
  print "A different state was selected"