In JavaScript, the .forEach()
method lets you execute the function you provide once for each element in a given array.
const animals = ["Giraffe", "Orangutan", "Elephant"]
animals.forEach((animal) => console.log(animal))
// Giraffe
// Orangutan
// Elephant