In p5, draw as many circles as you can in the next 3 minutes.
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?
4.1 p5.js: while and for loop from shiffman on Vimeo.
while
loopsWork like a conditional:
if (something True){
// do this code
} else {
// do this code
}
while(something True){
// run this code over and over again
}