Skip to content

Instantly share code, notes, and snippets.

@lizlongnc
Created October 14, 2014 22:27
Show Gist options
  • Save lizlongnc/24fb0039b8be5af2352e to your computer and use it in GitHub Desktop.
Save lizlongnc/24fb0039b8be5af2352e to your computer and use it in GitHub Desktop.
JS map method on an array object
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