Last active
October 7, 2017 18:51
-
-
Save juliobetta/e6fe32134a0c858a89f6ca722d8ce49f to your computer and use it in GitHub Desktop.
This file contains 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 characters
const hasDebutIn90s = character => character.debut >= 1990; | |
const getName = character => character.name; | |
console.log(characters.filter(hasDebutIn90s).map(getName)); | |
// [ | |
// "Captain Falcon", | |
// "Fox", | |
// "Kirby" | |
// ] | |
console.log(characters.some(hasDebutIn90s)); | |
// true | |
console.log(characters.every(hasDebutIn90s)); | |
// false | |
console.log( | |
getName( | |
characters.find(hasDebutIn90s) | |
) | |
); | |
// "Captain Falcon" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment