4 Elseif


#1

Hello everyone,

Please can somebody write a code as an example to understand slide 4

Thank you in advance


#2

Note the spelling... elsif

x = 1
y = 2
if x > y
  puts "x is greater than y"
elsif x < y
  puts "x is less than y"
else
  puts "x is equal to y"
end

#3

thanks mtf,

regards

Brendan