Skip to content

SanskritiGupta05/PokeMoves

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

⚡PokeMoves:

for Keploy Fellowship Task - 3

This is a project made with public API Pokemon API.

It fetches the popular moves of a pokemon -> entered by the user -> and then display them as Output!

(NOTE: please write pokemon names in "SMALLCASE LETTERS" for the API to fetch the data.)

Web page screenshot

  1. This codeblock fetches the first 5 moves of Pokemon from the moves Array.👇🏻
 fetch(url)
    .then((res) => res.json())
    .then((data) => {
        let moveList = "";
            for (let i = 0; i < 5; i++) {
                moveList += `<i class="fa-solid fa-bolt"></i>` + "  " + data.moves[i].move.name + "  " + `<i class="fa-solid fa-bolt"></i>` + "<br>";
        }
  1. This code block displays that data as output. 👇🏻
      document.getElementById('output').innerHTML =  moveList;