xxxxxxxxxx
22
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
// Make a calculation by calling plus5().
let ans = plus5(10);
// Style the text.
textAlign(CENTER);
textSize(30);
// Display the text.
text(`10 + 5 = ${ans}`, width / 2, height / 2);
}
function plus5(x) {
let ans = x + 5;
return ans;
}