Skip to content

Instantly share code, notes, and snippets.

@chaintng
Created July 23, 2016 10:21
Show Gist options
  • Save chaintng/e1c421c2f163b40d348bd005d73131bc to your computer and use it in GitHub Desktop.
Save chaintng/e1c421c2f163b40d348bd005d73131bc 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