Skip to content

Instantly share code, notes, and snippets.

@flexaddicted
Last active January 27, 2019 11:58
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/897cd0b8c2000ad7edb74ecf5a0c72d2 to your computer and use it in GitHub Desktop.
Save flexaddicted/897cd0b8c2000ad7edb74ecf5a0c72d2 to your computer and use it in GitHub Desktop.
const doubles = [1, 2, 3, 4].myMap(function(number) {
return number * 2;
});
// or using lambda
// const doubles = [1, 2, 3, 4].myMap(number => number * 2);
console.log(doubles);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment