Created
October 14, 2014 22:27
-
-
Save lizlongnc/24fb0039b8be5af2352e to your computer and use it in GitHub Desktop.
JS map method on an array object
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 people = ['Jim', 'Bob', 'Jane', 'Jill']; | |
var welcomes = people.map(function(name) { | |
return 'Hi' + ' ' + name + '!'; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment