Control flow Operators Flashcards Preview

Ruby > Control flow Operators > Flashcards

Flashcards in Control flow Operators Deck (6)
Loading flashcards...
0

If

If # Test = True
# Do

End

1

Else

If # Test = False
# Do
else
# Do
End

2

Elsif

Another Test = True

End

3

Unless

Unless # Test = True
# Do
End

4

What is missing?

if (x >= 10)
print "Learning Ruby"

if x >= 10
print "Learning Ruby"
end

5

What do you need to delete?

if ( x >= 10)
print "Learning Ruby"

Brackets

if x >= 10
print "Learning Ruby"
end

Don't forget the end