πŸ” while Loops

Do Now (in p5)

In p5, draw as many circles as you can in the next 3 minutes.

Loopy

Drawing a bunch of circles is terrible. Let’s not do that.

function draw() is a loop. What if we wanted to write our own?

One place I learn new things:

4.1 p5.js: while and for loop from shiffman on Vimeo.

while loops

Work like a conditional:

if (something True){
    // do this code
} else {
    // do this code
}
while(something True){
    // run this code over and over again
}