Learn
The Zen of Ruby

The Ternary Operator

Good! Let's make our code even more streamlined using the ternary operator.

three = 3 puts three == 3 ? "Of course." : "What?" # ==> puts "Of course."

The example above is just a syntax reminder.

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.