#654. List item
When the green flag is clicked, this script runs. What will the cat say?
when green flag clicked delete all of [fruits v] add [orange] to [fruits v] add [apple] to [fruits v] add [banana] to [fruits v] add [pear] to [fruits v] say (item (2) of [fruits v])
fruits = []
# When the green flag is clicked
fruits.clear()
fruits.append("orange")
fruits.append("apple")
fruits.append("banana")
fruits.append("pear")
print(fruits[1])
const fruits = [];
// When the green flag is clicked
fruits.length = 0;
fruits.push("orange");
fruits.push("apple");
fruits.push("banana");
fruits.push("pear");
console.log(fruits[1]);
💡 Not sure? Build it in Scratch and try it out.