Last active
July 17, 2022 09:35
-
-
Save AcheZeta/1159eff6df3e2b14f2dbee551f2fcf40 to your computer and use it in GitHub Desktop.
Fetch Pokemon 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
//Function to Fetch the API | |
const getPokemon = () => { | |
//You can use name, number, type, or ability in the url. | |
//Example: pokemon/ditto/, pokemon/1/, type/3/ or ability/4/. | |
fetch(`https://pokeapi.co/api/v2/pokemon/25/`) | |
.then(response => response.json()) | |
.then(data => { | |
console.log(data) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment