Sitemap
Dom Loulie

Dom Loulie

JavaScript Project Phase 1 - API

3 min readApr 29, 2023
Chuck Norris does not sleep. He waits.

My project for Phase 1 was a Chuck Norris App. I chose the Chuck Norris API as an excellent way to get started because it doesn’t require any special API keys or authentication, making it easy to access and use. The documentation for the Chuck Norris API is also very short but comprehensive enough that even a beginner like me could understand how it works in no time at all. Plus, working on this project can be fun as I explore the kind of jokes I can pull from its database! Additionally, I got to know the popular culture and Internet phenomenon of Chuck Norris during my childhood years, which helps me differentiate between Chuck Norris jokes and JavaScript functions.

The App allows users to search for funny facts about Chuck Norris and retrieves random jokes every time they click the button. The tools used were HTML, CSS, and JavaScript, and the API used was https://api.chucknorris.io/.

Get Dom Loulie’s stories in your inbox

Join Medium for free to get updates from this writer.

I proceeded by creating three event handlers to enable fundamental functionalities, such as highlighting the ability to alter the background colours, the “Like” button to appreciate content, and a “Get a Joke” button to showcase the application’s features. Furthermore, I introduced a drop-down category filter, enabling the display of random quotes from the chosen category. Additionally, I integrated a hover selector that alters the button’s colour upon mouse hover.

The JavaScript script interacts with the Chuck Norris Jokes API to display Chuck Norris jokes on a webpage. The script also includes functionality to change the background colour and track the number of likes for a joke.

Making this app was definitely a learning experience for me. As it was my first JavaScript project, I encountered many challenges throughout the project and had many frustrating moments while making it. One of the biggest issues I encountered involved trying to get my fetch function to catch data. Despite having gone through the lecture step-by-step, consulting JavaScript books, and watching YouTube tutorials, something wasn’t quite right, and I couldn’t figure out why, no matter how hard I tried! After much trial and error, however, everything eventually clicked into place and worked as expected, making all that effort worth it in the end!

Finally, after completing all these steps, the final product turned out exactly as I imagined it from the beginning stages when I first started planning out everything needed to make a successful, functioning Chuck Norris API-based application.

Going forward, I not only gained valuable experience working with an API, but I also learned a lot more about the coding languages and tools used to bring my idea to life. I am now able to take advantage of the benefits that come with working with APIs, such as faster development times, better user experiences, and improved scalability. I also understand that my passion for accessibility is highly valuable in making Web applications accessible in future API projects.

--

--