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.



Refactor the if statement in the editor to use a ternary operator to puts the correct sentence.

Take this course for free

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

Or sign up using:

Already have an account?