Skip to Content
Learn
Control Flow in Ruby
Not

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

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

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

Already have an account?