Skip to content

Instantly share code, notes, and snippets.

@GrahamTheDevRel
Created September 19, 2023 08:51
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 GrahamTheDevRel/9ba078625dd07acaee2765c86f43f911 to your computer and use it in GitHub Desktop.
Save GrahamTheDevRel/9ba078625dd07acaee2765c86f43f911 to your computer and use it in GitHub Desktop.
array.map() example from MDN
const array1 = [1, 4, 9, 16];
// Pass a function to map
const map1 = array1.map((x) => x * 2);
console.log(map1);
// Expected output: Array [2, 8, 18, 32]
@Kryslynn93
Copy link

Raw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment