Skip to content

Instantly share code, notes, and snippets.

@AcheZeta
Created September 10, 2019 21:59
Show Gist options
  • Save AcheZeta/63f7efaa83c6649d05cc8169241a1964 to your computer and use it in GitHub Desktop.
Save AcheZeta/63f7efaa83c6649d05cc8169241a1964 to your computer and use it in GitHub Desktop.
//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