Created
March 20, 2020 18:39
-
-
Save annthurium/de01eb61859c38700152be4abf7bbd74 to your computer and use it in GitHub Desktop.
get the number of genderless pokemon from the poke api
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 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