Ruby conditionals - if statement
- if
x = 2
if x > 1
puts "x is bigger than 1"
end
if x > 3
puts "x is bigger than 3"
end
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
x = 2
if x > 1
puts "x is bigger than 1"
end
if x > 3
puts "x is bigger than 3"
end