My First Javascript Application(And My First Blog post!)

Luis Dejesus Castro
2 min readApr 8, 2021

--

I wanted to write a blog post about the personal journey involved with learning a new (programming) language with zero prior knowledge about the subject, but I feel like I could probably accomplish that by writing about my application and explaining what I’m most proud of about the Javascript.

I created the Beer Application which takes in an API of beers, converts the information to readable JSON, renders an array of beers, and then renders each beer onto a card which is then displayed on the page. I thought I could get away with displaying the beer’s name, tagline, ABV, and description all on the card without text overflowing off the page but because some beers had longer descriptions than others, and text poured right off the cards after I ran my file in the browser.

I was thinking of ways to be able to display the information on the page without the mess so I decided to use an event listener to create a button for the description field of each beer. But where would I display the information once the button was clicked? Then I remembered a lesson from phase 1 where we were tasked to create a Modal that would appear whenever an error occurred between the page and the server, and the modal’s inner text would display the error message. I used that same knowledge to attach the beer’s description button to a modal that appears at the top of my application and disappears after 15 seconds, giving the user more than enough time to read the lengthy descriptions.

My original idea to add functionality to my page was adding a “like” button to each beer but since we weren’t pushing any information to a server, a like button seemed silly, and honestly, I am really proud of the outcome of my very first javascript application.

--

--