Last active
May 25, 2023 15:48
-
-
Save mpj/c5ae804e576042b3287d to your computer and use it in GitHub Desktop.
Revisions
-
mpj revised this gist
Aug 23, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ var names = [] for (var i = 0; i < animals.length; i++) { names.push(animals[i].name) } -
mpj revised this gist
Aug 23, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ var animals = [ { name: 'Fluffykins', species: 'rabbit' }, { name: 'Caro', species: 'dog' }, { name: 'Hamilton', species: 'dog' }, { name: 'Harold', species: 'fish' }, { name: 'Ursula', species: 'cat' }, { name: 'Jimmy', species: 'fish' } ] -
mpj revised this gist
Jun 28, 2015 . 4 changed files with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes.File renamed without changes.File renamed without changes.File renamed without changes. -
mpj revised this gist
Jun 28, 2015 . 6 changed files with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes.File renamed without changes.File renamed without changes.File renamed without changes.File renamed without changes.File renamed without changes. -
mpj revised this gist
Jun 28, 2015 . 4 changed files with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ var names = animals.map(function(animal) { animal.name + ' the ' + animal.species }) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ var names = animals.map((x) => x.name) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ var names = animals.map((animal) => animal.name) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ var names = animals.map(function(animal) { return animal.name }) -
mpj revised this gist
Jun 28, 2015 . 3 changed files with 6 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,5 +5,4 @@ var animals = [ { name: 'Harold', species: 'fish' } { name: 'Ursula', species: 'cat' }, { name: 'Jimmy', species: 'fish' } ] This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ var names = [] for (var i = 0; i < animals.length; i++) { names.push(animals.name[i]) } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ var names = animals.map(function(x) { return x.name }) -
mpj revised this gist
Jun 28, 2015 . 1 changed file with 1 addition and 14 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,17 +6,4 @@ var animals = [ { name: 'Ursula', species: 'cat' }, { name: 'Jimmy', species: 'fish' } ]
-
mpj renamed this gist
Jun 28, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
mpj renamed this gist
Jun 28, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
mpj revised this gist
Jun 28, 2015 . 1 changed file with 2 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,18 +11,11 @@ var names = [] for (var i = 0; i < animals.length; i++) { names.push(animals.name[i]) } var names = animals.map(function(x) { return x.name }) var names = animals.map((x) => x.name + ' the ' + x.species) var names = animals.map((x) => { return x.name }) var names = animals.map((x) => x.name) -
mpj revised this gist
Jun 26, 2015 . 1 changed file with 11 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,9 +12,17 @@ for (var i = 0; i < animals.length; i++) { names.push(animals.name[i]) } var names = [] ;for (var i = 0; i < animals.length; i++) { names.push(animals.name[i]) } var names = animals.map(function(x) { return x.name }) var names = animals.map((x) => { return x.name }) var names = animals.map((x) => x.name) var names = animals.map((x) => x.name + ' the ' + x.species) var numAnimals = animals.reduce((prev, cur) => { if(!prev[cur.species]) prev[cur.species] = 0; prev[cur.species]++ , {}) -
mpj created this gist
Jun 26, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ var animals = [ { name: 'Fluffykins', species: 'rabbit' }, { name: 'Caro', species: 'dog' }, { name: 'Hamilton', species: 'dog' }, { name: 'Harold', species: 'fish' } { name: 'Ursula', species: 'cat' }, { name: 'Jimmy', species: 'fish' } ] var names = [] for (var i = 0; i < animals.length; i++) { names.push(animals.name[i]) } names = animals.map(function(x) { return x.name }) names = animals.map((x) => { return x.name }) names = animals.map((x) => x.name)