Skip to content

Instantly share code, notes, and snippets.

@jackpordi
Created September 11, 2019 21:52
Show Gist options
  • Save jackpordi/d5ee763b3be992f431d5a55008f7e6dd to your computer and use it in GitHub Desktop.
Save jackpordi/d5ee763b3be992f431d5a55008f7e6dd to your computer and use it in GitHub Desktop.
const myArray = [1, 4, 9, 16];
const mappedArray = myArray.map( x => x * 2 );
// Same output as using timesTwo
console.log(mappedArray);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment