Skip to content

Instantly share code, notes, and snippets.

@annthurium
Created March 20, 2020 18:39
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 annthurium/de01eb61859c38700152be4abf7bbd74 to your computer and use it in GitHub Desktop.
Save annthurium/de01eb61859c38700152be4abf7bbd74 to your computer and use it in GitHub Desktop.
get the number of genderless pokemon from the poke api
const got = require("got");
(async () => {
try {
const response = await got("https://pokeapi.co/api/v2/gender/3/");
const pokemonSpecies = JSON.parse(response.body);
console.log(pokemonSpecies.pokemon_species_details.length);
} catch (error) {
console.log(error);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment