DEV Community

es404020
es404020

Posted on

Ruby Conditional Statements

In this post we look at if, else, elsif statement .This are the conditional operation which perform an action based on the Boolean response it pretty straight forward to use

state=true

if state
  puts "you pick true"
elsif !state
  puts "you pick false"
else 
  puts "nothing was picked"

end


Enter fullscreen mode Exit fullscreen mode

That all thanks for reading

Top comments (0)