Newbie: if statement with multiple conditions

This seems to be way too easy, but I can’t seem to find an example
online…

Is it possible to have an “if” statement with multiple conditions?

For example:

if variable1 == “THIS” or “THAT” or “THOSE”

end

I’m assuming Ruby has a much more elegant sytax to accomodate this.

Thanks!

Well, how about …

if [“THIS”,“THAT”,“THOSE”].include?(variable1)

c.

Ryan wrote:

This seems to be way too easy, but I can’t seem to find an example
online…

Is it possible to have an “if” statement with multiple conditions?

For example:

if variable1 == “THIS” or “THAT” or “THOSE”

end

I’m assuming Ruby has a much more elegant sytax to accomodate this.

Thanks!

Very cool, that works!

Thanks Cayce,