xxxxxxxxxx
28
let btn;
let showTime;
function setup() {
createCanvas(600, 600);
background(220);
btn=createButton("Draw Random Shape");
btn.mousePressed(drawIt);
//CALL BACK FUNCTION
//TRY ANONYMOUS CALLBACK FUNCTIONS
showTime = function (){
console.log(second());
};
setInterval(showTime,1000);
}
function drawIt(){
fill(217,56,96);
noStroke();
ellipse(random(width),random(height),100,100);
}
function draw() {
}