p5js. while loop review JavaScript

//task creates a while loop w/ gradient colour and increasing font size

function setup() { //no interaction, no draw function


createCanvas(400, 400);


background(60, 100, 220);


textAlign(CENTER);


var i = 0; //declare + assign


while (i < 10) { // if the variable i is less than 10


fill(i * 30) // 30 times each time


textSize(i * 10); //10 times each time


text("FontSize" + i * 10, 200, i * 40); //increases height each time


i++;// add 1 

}

}