setup()
setup() runs once when the sketch starts. It's where you initialize your canvas and set up global drawing settings like text alignment and size. Using windowWidth and windowHeight makes your sketch adapt to different screen sizes.
function setup(){createCanvas(windowWidth,windowHeight);textAlign(CENTER,CENTER);textSize(20);}
Line by Line:
createCanvas(windowWidth,windowHeight)- Creates a canvas that fills the entire browser window, making the sketch responsive to different screen sizes
textAlign(CENTER,CENTER)- Sets text alignment so that text is centered both horizontally and vertically around the coordinates you specify
textSize(20)- Sets the font size to 20 pixels for all text drawn in the sketch