Store lists in arrays. Loop with for. Use push, pop, filter, map.
// Array - inventory of flavors
const flavors = ["Espresso", "Latte", "Mocha"];
// For loop
for (let i = 0; i < flavors.length; i++) {
console.log(flavors[i]);
}
// Array methods
flavors.push("Americano"); // add
const hot = flavors.filter(f => f !== "Iced");
forEach, map, filter return new arrays. Use them instead of manual loops when you can.
Arrays start at 0. flavors[0] is the first item.