Skip to content

Instantly share code, notes, and snippets.

@samuelpath
Last active December 15, 2020 15:05
Show Gist options
  • Select an option

  • Save samuelpath/e31d18f83e8db94ed76ceee3b94cc377 to your computer and use it in GitHub Desktop.

Select an option

Save samuelpath/e31d18f83e8db94ed76ceee3b94cc377 to your computer and use it in GitHub Desktop.

Revisions

  1. samuelpath revised this gist Dec 15, 2020. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions map.js
    Original file line number Diff line number Diff line change
    @@ -9,6 +9,8 @@ const jobs = [
    const jobsWithIdsMultipliedByTen = jobs.map(idMultiplier);

    /*
    Voici le contenu attendu dans jobsWithIdsMultipliedByTen :
    const jobsWithIdsMultipliedByTen = [
    { id: 10, isActive: true },
    { id: 20, isActive: true },
  2. samuelpath revised this gist Dec 15, 2020. 1 changed file with 9 additions and 1 deletion.
    10 changes: 9 additions & 1 deletion map.js
    Original file line number Diff line number Diff line change
    @@ -6,4 +6,12 @@ const jobs = [

    // const idMultiplier =

    const idsMultipliedByTen = jobs.map(idMultiplier);
    const jobsWithIdsMultipliedByTen = jobs.map(idMultiplier);

    /*
    const jobsWithIdsMultipliedByTen = [
    { id: 10, isActive: true },
    { id: 20, isActive: true },
    { id: 30, isActive: false }
    ];
    */
  3. samuelpath revised this gist Dec 15, 2020. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion map.js
    Original file line number Diff line number Diff line change
    @@ -4,4 +4,6 @@ const jobs = [
    { id: 3, isActive: false }
    ];

    // const idsMultipliedByTen =
    // const idMultiplier =

    const idsMultipliedByTen = jobs.map(idMultiplier);
  4. samuelpath created this gist Dec 15, 2020.
    7 changes: 7 additions & 0 deletions map.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    const jobs = [
    { id: 1, isActive: true },
    { id: 2, isActive: true },
    { id: 3, isActive: false }
    ];

    // const idsMultipliedByTen =