While Loops
19·6
2016
While loops are similar to for loops in that they loop over a piece of code. The only difference is that a for loop continues until a condition is met and a while loop continues while a condition is met.
Quick sideline in this lesson. When we write boolean = true
we can also just write boolean
.
Simple while loop example: