setup()
setup() runs once when the sketch starts. It's the perfect place to initialize your canvas and set default drawing settings that apply to the whole sketch.
function setup() { createCanvas(windowWidth, windowHeight); textAlign(CENTER, CENTER); textSize(80); }
Line by Line:
createCanvas(windowWidth, windowHeight)- Creates a canvas that fills the entire browser window, making the coin flip experience fullscreen
textAlign(CENTER, CENTER)- Sets text alignment so that all text is centered both horizontally and vertically at its coordinates
textSize(80)- Sets the default text size to 80 pixels (this will be overridden in draw() for different text elements)