September 2013
Beginner
292 pages
6h 19m
English
We're going to do something a little different in this loop. Once we find the pony we want, we'll breakout of the while loop. This is handy when looping through a large list of objects. When the desired data is found, there's no sense in continuing to loop through the rest of the list:
LearningScript as shown in the next screenshot.
If we have been searching for Fluttershy instead of Rainbow Dash, and not included the break keyword on line 19, the output would have been exactly the same as the for loop example. In fact, the ...