Learn

Ruby also has the or operator (||). Ruby’s || is called an inclusive or because it evaluates to true when one or the other or both expressions are true. Check it out:

true || true # => true true || false # => true false || true # => true false || false # => false

Instructions

1.

Set each variable to true or false depending on what value you expect the expression to return.

Folder Icon

Take this course for free

By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Already have an account?