jmconnor3 / pokemon_underscore

[javascript, underscore]

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Underscore.js: Gotta Catch 'Em All!

Overview

The goal of this exercise is to get an introduction to Underscore.js.

Instructions:

Your job is to fill in each of the functions stubbed out in the pokemon.js file so that they work. I've written Jasmine Tests for each of them besides "printAllPokemonNamesToConsole", which you will just have to check manually.

For the others, go through the underscore.js docs and write the code that makes the tests pass.

To check if the tests have passed, open up SpecRunner.html in your browser.

underscore.js!

Notes

  • I've namespaced all of the functions to pokemon aka they are encapsulated in a pokemon object in src/pokemon.js.
  • I've put all of the pokemon data in src/data.js file. You do not need to modify anything in this file!
  • You shouldn't have to use any "for" loops.

Bonus 1

  • Add an event listener to the "Gotta Catch 'Em All!" button so that when you click on it, it creates a div with the class "pokeball" for each Pokemon Type.

  • When you click on the div for a particular Pokemon Type, it should display a list of all the Pokemon of that type in that div.

Bonus 2

  • Peruse the underscore.js docs for other interesting / useful functions and figure out how they work.

  • When you have some free time, it's also worth checking out the annotated source code to see how the library works under the hood.

About

[javascript, underscore]


Languages

Language:JavaScript 99.6%Language:CSS 0.3%Language:HTML 0.1%