Created
November 7, 2019 16:31
-
-
Save NyaGarcia/cb447780a189dbb73ded02cd95ceaa4c to your computer and use it in GitHub Desktop.
Two functions that return true; return false;
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 characters
function isWildPokemon(pokemon) { | |
if (pokemon.isWild) { | |
return true; | |
} else { | |
return false; | |
} | |
} | |
function isSaved(pokemonId) { | |
if (this.savedPokemon.some(({ id }) => id === pokemonId)) { | |
return true; | |
} else { | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment