Skip to content

Instantly share code, notes, and snippets.

@antronic
Forked from chaintng/pokedex-jquery-2.js
Created August 19, 2016 10:50
Show Gist options
  • Save antronic/e283170a720eea155a54a13958a29039 to your computer and use it in GitHub Desktop.
Save antronic/e283170a720eea155a54a13958a29039 to your computer and use it in GitHub Desktop.
pokedex-jquery-2.js
// 2. set render function
var renderPokemonList = function(filterPokemon) {
$("#filterPokemonCount").html(filterPokemon.length);
var liStrings = filterPokemon.map(function (item) {
return "<li>" + item.name + " (Atk: " + item.attack + ", Def: " + item.defense + ")</li>";
});
$("#pokemonListUl").html(liStrings);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment