Created
November 15, 2017 21:48
-
-
Save jasocox/4b1db9292d8a8d4b3cf215173a2d945e to your computer and use it in GitHub Desktop.
An example of mapping over data in JavaScript.
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 list = [1, 2, 3, 4]; | |
var doubled = list.map(item => item * 2); | |
console.log(list); | |
console.log(doubled); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment