#687. Is it in the list?
When the green flag is clicked, this script runs. What will the cat say?
when green flag clicked delete all of [animals v] add [cat] to [animals v] add [dog] to [animals v] add [horse] to [animals v] say <[animals v] contains [horse]?>
animals = []
# When the green flag is clicked
animals.clear()
animals.append("cat")
animals.append("dog")
animals.append("horse")
print("horse" in animals)
const animals = [];
// When the green flag is clicked
animals.length = 0;
animals.push("cat");
animals.push("dog");
animals.push("horse");
console.log(animals.includes("horse"));
💡 Not sure? Build it in Scratch and try it out.