Created
September 10, 2019 21:59
-
-
Save AcheZeta/63f7efaa83c6649d05cc8169241a1964 to your computer and use it in GitHub Desktop.
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
//This Function 'watch' if the input is null or a date. | |
const searchPoke = () => { | |
getUserId() | |
if (userBirthday == null || userBirthday == '') { | |
alert('Selecciona una fecha'); | |
return false; | |
} else { | |
getPokemon() | |
} | |
} | |
//This function shows the Pokemon | |
const renderPokemon = (pokemon) => { | |
pokeday.innerHTML = | |
`<div class="card"> | |
<h3><b>${pokemon.name}</b></h3> | |
<img src="${pokemon.sprites.front_default}" alt="Avatar" style="width:50%"> | |
<div class="info"> | |
<p>${pokemon.id}</p> | |
</div> | |
</div>` | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment