Skip to content

Instantly share code, notes, and snippets.

@samuelpath
Last active December 15, 2020 15:05
Show Gist options
  • Save samuelpath/e31d18f83e8db94ed76ceee3b94cc377 to your computer and use it in GitHub Desktop.
Save samuelpath/e31d18f83e8db94ed76ceee3b94cc377 to your computer and use it in GitHub Desktop.
map
const jobs = [
{ id: 1, isActive: true },
{ id: 2, isActive: true },
{ id: 3, isActive: false }
];
// const idMultiplier =
const jobsWithIdsMultipliedByTen = jobs.map(idMultiplier);
/*
Voici le contenu attendu dans jobsWithIdsMultipliedByTen :
const jobsWithIdsMultipliedByTen = [
{ id: 10, isActive: true },
{ id: 20, isActive: true },
{ id: 30, isActive: false }
];
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment