forEach a returned array js code example Example: how to use the foreach method in javascript groceries.forEach(groceryItem => console.log(groceryItem));