Created
October 6, 2016 22:15
-
-
Save 64lines/0ed20904bbf4a587eb3cbdba853cde2a to your computer and use it in GitHub Desktop.
[JAVASCRIPT] - Functional Map
This file contains hidden or 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 numbers = [1, 2, 3, 4]; | |
| var newNumbers = numbers.map(function(number){ | |
| return number * 2; | |
| }); | |
| console.log("The doubled numbers are", newNumbers); // [2, 4, 6, 8] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment