Last updated
Last updated
for
loops
while
loops
until
loops
loop
loops
.times
iterator loop
For every number between 1 - 50
Using the inclusive ..
operator tells the computer to include the last number in the loop
Will puts
numbers 1 - 50
Using the exclusive ...
operator tells the computer to exclude the last number from the loop
Will puts
the numbers 1-49
Display the number on the console
Ends instructions for the loop
Sets variable i
equal to one
While i
is less than or equal to 50, do the block of code (will print numbers 1 -50)
Display the number on the console
Increment i
by one every time, that way the loop will end at some point
Ends instructions for the loop
Sets variable i
equal to one
Until i
is greater than 50, run the block of code (will print numbers 1-50)
Display i
on the console
Increment i
by one every time, that way the loop will end at some point
End the instructions for the loop
Sets variable i
equal to one
Create a loop
, and run the block of code
Display i
on the console
Increment i
by one every time, that way the loop will end at some point
Break the loop if i
becomes greater than 50
End the instructions for the loop
Run this loop five times, and do the block of code
Display the string on the console
End the instructions for this loop