Skip to content

Instantly share code, notes, and snippets.

View stackSm4shr's full-sized avatar

Tim Becker stackSm4shr

View GitHub Profile
//---------------------------for_each---------------------------------------------------
// Initialize an Array of Numbers:
// Create an array called numbers containing the following values in order: 1, 2, 3, 4, 5.
const numbers = [1, 2, 3, 4, 5];
// Use the forEach Method to Print Each Number:
// Use the forEach method to iterate over numbers and print each number to the console.