Skip to content

Instantly share code, notes, and snippets.

@jonathan-fielding
Created October 16, 2020 19:18
Show Gist options
  • Save jonathan-fielding/2492ae9fbd608ffe56e3768d71bfa385 to your computer and use it in GitHub Desktop.
Save jonathan-fielding/2492ae9fbd608ffe56e3768d71bfa385 to your computer and use it in GitHub Desktop.
Array.forEach()
const fruits = ["Banana", "Orange", "Apple", "Mango", "Kiwi"];
fruits.forEach((fruit) => {
console.log(fruit); // Each fruit will be logged out one at a time
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment