• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Loop Statements

Conditionals are used to check something once, and then move on. Loop statements are used until the condition is no longer true.

Conditionals are often used with numerical values to see if a certain number of objects are present, or if a certain object has reached a designated spot on the stage. For instance, if we have an array of information, and we want to know each element in that array, we could use a loop statement to cycle through each element in an array until there are no more, like this:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint