Last active
November 28, 2021 10:24
-
-
Save rehasantiago/7ca5c1b47731a803b03caa71dfdb431d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const arr = [1,2,3,4]; | |
const newArr = arr.map(elem => { | |
return elem * 2 | |
}); | |
console.log(newArr); | |
// [2, 4, 6, 8] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment