Learn
Control Flow in Ruby

Unless

Good! Now let's review the unless statement.

problem = false
print "Good to go!" unless problem

Remember, this is basically a short hand if statement. It will do whatever you ask unless the condition is true. In our example, problem is false, so we don't have a problem. We print Good to go!

Community Forums
Get help and ask questions in the Codecademy Forums
Report a Bug
If you see a bug or any other issue with this page, please report it here.