Skip to content

Instantly share code, notes, and snippets.

@NyaGarcia
Created November 7, 2019 16:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NyaGarcia/cb447780a189dbb73ded02cd95ceaa4c to your computer and use it in GitHub Desktop.
Save NyaGarcia/cb447780a189dbb73ded02cd95ceaa4c to your computer and use it in GitHub Desktop.
Two functions that return true; return false;
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