Skip to content

Instantly share code, notes, and snippets.

@NyaGarcia
Created November 7, 2019 16:50
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/99d90e04297abfe0341e846158662c3b to your computer and use it in GitHub Desktop.
Save NyaGarcia/99d90e04297abfe0341e846158662c3b to your computer and use it in GitHub Desktop.
Directly returning boolean values to avoid return true return false
function isWildPokemon(pokemon) {
return pokemon.isWild;
}
function isSaved(pokemonId) {
return this.savedPokemon.some(({ id }) => id === pokemonId);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment