Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

Ruby if

#SYNTAX:
if condition
   your code
elsif condition
   your code
else
   your code
end

#EXAMPLES:

x = 12
y = '12'

if (x == y and (x.class == Integer))
	puts "Identical!"
elsif (y == 12 and (y.class == String))
	puts "Identical!"
else
	puts "None were found identical"
 
PREVIOUS NEXT
Tagged: #Ruby
ADD COMMENT
Topic
Name
6+3 =