Conditional
Last updated
Was this helpful?
Was this helpful?
var num = Math.rand(3);
if num == 1 {
print "Random number was 1"
} else if num == 2 {
print "Random number was 2"
} else if num == 3 {
print "Random number was 3"
} else {
print "Random number was #{num}"
}