Skip to content

Instantly share code, notes, and snippets.

@flexaddicted
Last active January 27, 2019 11:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flexaddicted/e1b53b9dcc4088b608b7c4973d82571a to your computer and use it in GitHub Desktop.
Save flexaddicted/e1b53b9dcc4088b608b7c4973d82571a to your computer and use it in GitHub Desktop.
const doubles = [1, 2, 3, 4].map(function(number) {
return number * 2;
});
// or using lambda
// const doubles = [1, 2, 3, 4].map(number => number * 2);
console.log(doubles);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment