Javascript: It loves me, it loves me not

Angelo T
2 min readOct 7, 2021

Phase 4, JavaScript. When I first heard those words, I was excited, nervous and interested to see how the front end differs from the back end. We had spent the better part of 6 months learning Ruby, then Rails and really getting a handle on how that works. For the most part, Ruby is very straight forward and not much room for interpretation or creativity.

JavaScript is the complete opposite. From functions to serializers, you have endless possibilities in JS and that was frightening to me. I still have a long way to go before I feel comfortable saying that I’m a JavaScript developer, but I’m happy that Flatiron teaches this language as it’s extremely important in the real world.

I decided to create my one page app as a Funko-pop E-commerce site from the perspective of the admin, where one could add or edit inventory. In order to have a better understanding of JS, I needed to supplement my learning with a Udemy course that taught me some interesting concepts, such as modals. I utilized this concept by creating an “Add Item” form that is hidden. Once the “Add Item” button is clicked, a form is unhidden. The user can click on the “close” button or anywhere outside of the form to close the window. This allows for the form to be utilized and not refresh the page.

As you can see from above, on the click event, we are either removing the “hidden” field to display the form, or adding “hidden” to remove the form. I had a lot of fun implementing this functionality because it made sense and was relatively easy.

The biggest challenge for me during this entire project was learning the “why” when it came to writing JS code. There are so many moving parts when writing not just functions, but functions within classes and trying to keep track of the variables within the index.js, category.js and categoryService.js files.

As I mentioned earlier, I am very excited to continue my journey with JavaScript because of its importance in the programming world, but this was a great first step and my confidence is slowly growing, the more and more I code in JavaScript.

--

--

Angelo T

fashion professional turned software engineering student