So!, it is the day two of the home exercise and should I shout?, Oh my God! I never knew JavaScript is used for so many stuffs. I always thought that JavaScript was just some dorky language used on web pages for the sake of dynamism , then today I started seeing JQuery, JSON, Node, accessing APIs using JavaScript. One thing though, If you have an idea of JavaScript structure it will be a walk in the park for you.

After having a long and hectic day yesterday I woke up this morning pondering on how I am going to solve today’s task. It has been all up in my head till I fell asleep yesterday, knowing fully well that I can solve the algorithm for today. I thank God I got the chance to learn something new which is DON’T JUST CODE!, THINK FIRST AND FAST!. After seeing the first task which is word count, I thought about it and lots of ideas started coming to my head it did not take me long to figure it out!. The second is reverseString which took me a little time but I eventually got. The two algorithms worked fine and also passed their respective test cases .

I can now work with git though I have to ask my BFA when it is neccessary to use a branch in git , I have to admit he gave me a wonderful explanation. After a brief pondering on what is required of me for the API task, I research on how to use the getJSON library which I can use to consume the API I am to use. After series of searching for api that can work with getJSON client, I found the OpenWeather API which was easy to work with after going through their documentation. I generated an api key. It was fun! I was able to pass the api url to the getJSON client which in turn let me pull data from the api that was displayed on the console.

I am really in love with JavaScript , uploading the code to GitHub wasn’t a problem for me at all….smiles. Looking forward to tomorrow’s tasks, I know, I will be able to solve it easily with the experience I have had today.