Lesson 6
Loops
Nothing has the potential to "break" your browser as much as a loop. If you create a loop but don't put in a stop of some type, the loop will continue to run until it locks up your browser or computer. So you have been warned. If you accidentally create a loop and your computer locks, you'll most likely lose any work you've done that wasn't saved.
Loops allow you to run a code over and over, without having to type that code over and over. But as stated above, you need to have something in your code to stop running the loop. This could be having it count each time it runs the code and stopping when it reaches a certain number. It could be running the code against an input and stopping at the end of the input. But remember, something needs to stop the code.
Activities
- Complete Loops in Codecademy
- Complete Checkpoint 6 which will be posted in Google Classroom.