Skip to content

Instantly share code, notes, and snippets.

@zacjones93
Last active May 4, 2020 16:13
Show Gist options
  • Save zacjones93/d9d526f350b634b57e8fd784e6297954 to your computer and use it in GitHub Desktop.
Save zacjones93/d9d526f350b634b57e8fd784e6297954 to your computer and use it in GitHub Desktop.
Iterate through an an Array with JavaScript map
const numbers = [2, 4, 6, 8]
const numbers2 = numbers.map(number => number * 2)
console.log(numbers)
console.log(numbers2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment