Ruby does 'elseif' still exist
Posted
by
catchmikey
on Stack Overflow
See other posts from Stack Overflow
or by catchmikey
Published on 2012-11-25T11:01:51Z
Indexed on
2012/11/25
11:03 UTC
Read the original article
Hit count: 294
I'm just learning ROR and I came across the if / else statements. I also came across 'elseif' but my text editor (textmate) doesn't pick it up as a keyword, not does the program run properly.
if name == 'Chris'
puts 'What a lovely name.'
elseif name == 'Katy'
puts 'What a lovely name!'
end
I'm using the book, Learn to Program, which was written several years ago. I was wondering if the 'elseif' was changed because when I simply use 'else' it seems to function properly
© Stack Overflow or respective owner