// Primera forma const groceries = ['brown sugar', 'salt', 'cranberries', 'walnuts']; groceries.forEach(function(groceryItem){ console.log(' - ' + groceryItem); }); // Segunda forma groceries.forEach(groceryItem => console.log(groceryItem)); // Tercera forma function printGrocery(element){ console.log(element); } groceries.forEach(printGrocery);