Created
January 15, 2019 10:41
-
-
Save hadnazzar/63398a0c9e5db8233fb0cb575807e667 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
var array1 = [1, 4, 9, 16]; | |
// pass a function to map | |
const map1 = array1.map(x => x * 2); | |
console.log(map1); | |
// expected output: Array [2, 8, 18, 32] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment