xxxxxxxxxx
17
function setup() {
createCanvas(50, 50);
textSize(32);
mouseReleased();
}
// Clear the screen blue when the mouse is pressed.
function mousePressed() {
background(color('lightblue'));
}
// Display a random number when the mouse is released.
function mouseReleased() {
background(255);
const randomInteger = floor(random(9));
text(randomInteger, 17, 36);
}