Finally, Ruby has the boolean operator not (!). ! makes true values false, and vice-versa.

!true # => false !false # => true



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

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?