Pokémon JavaScript Project
At first, JavaScript was very intimidating. Coming from Ruby, it just did not seem to flow as seamlessly to me. Once I began working on this project it slowly started making sense. I appreciate separating everything into usable functions and classes. Basically puzzle pieces forming to make what is the application.
My application starts out with a pseudo log in where the user enters a name, no passwords or validations. Once inside I presented a list of Pokémon for the user to choose from to create a team. Each Pokémon has a catch button underneath it. Once you click ‘catch’ you now have one of those Pokémon in your team. To see this, all the user has to do is click on their name at the top of the page to pull up their current team list. Each Pokémon in the current team list has a button as well but it is a release button so that you can remove Pokémon from your team.
Some of my favorite processes include: fetch, async and await. Fetch allows you to request for a resource, this returns a promise that resolves into an object. Async allows code to be executed immediately without waiting on the main program “flow”. Await is used to wait for a promise to be resolved or rejected. All are used together for in this example below.
With time I’ve become more accustomed to JavaScript and increasingly confident in using it. This mod was extremely challenging, mostly because it felt rushed. Especially compared to all the Ruby mods we had prior. Once I started playing with and applying the concepts outside of the test driven labs to this project, everything started to click. I am very excited to see what we learn next mod now that I am much more comfortable with JavaScript.