xxxxxxxxxx
18
let myText;
function setup() {
createCanvas(100, 100);
myText = getItem('myText');
if (myText === null) {
myText = '';
}
}
function draw() {
textSize(40);
background(255);
text(myText, width / 2, height / 2);
}
function keyPressed() {
myText = key;
storeItem('myText', myText);
}