The setlist queue changes when a new item arrives or the last one is removed. Practice push() and pop() in script.js; inspect the remaining queue in the Console.
Mutation methods change the original array. This lesson focuses only on push() and pop() so learners can see how an array grows and shrinks at the end.
const wateringQueue = ["fern", "ivy"];
wateringQueue.push("orchid");
const lastPlant = wateringQueue.pop();
console.log(lastPlant, wateringQueue); // orchid ["fern", "ivy"]
push() to add "third" to the provided queue.pop() to remove that last item into removedItem.first,second | third on its own line in the Console.Use push() to add an item to the end of the array.
Use pop() to remove and store the last item.