xxxxxxxxxx
23
// function setup() {
// createCanvas(300, 300);
// let ellipseX = 50; // create and initialize a variable
// while (ellipseX < width) { // keep going as long as the condition is true
// fill(178,98,88)
// ellipse(ellipseX, 50, 40, 40);
// // modify the variable so something different happens next time
// ellipseX = ellipseX + 50;
// print("the next value of ellipseX is", ellipseX);
// }
// }
function setup() {
createCanvas(300, 300);
for (let ellipseX = 50; ellipseX < width; ellipseX = ellipseX + 50) {
fill(32,99,200)
ellipse(ellipseX, 50, 40, 40);
print("the next value of ellipseX is", ellipseX);
}
}