Is Javascript actually FUN(ction)?

I am now completing the 4th project for Flatiron School’s Software Engineering program. This project required us to have a Javascript front-end and Rails back-end. I decided to do something completely different and create a game. Javascript honestly scared me in the beginning. Throughout the project, though, I really came to (dare I say it) enjoy the language(?!).

This was our first project where we could really see DOM manipulation happening in real time. Once you understand the basics of JS and the necessity of functions, you can really accomplish a lot. So I set up a basic html page of how my app would start and then got to coding.

I created a game called Brunch Madness where you act as the waiter during a busy brunch period and are trying to deliver all the correct drink orders. The flow of the game came very easy as I knew what order things needed to occur in: place an order, fulfill the bar order, request the check and receive payment. It felt very natural to build this out in Javascript, much different than Rails.

One of my favorite features of Javascript was the ability to run asynchronously. This allowed fetch requests to happen in the background without having to wait for them to complete. Another example is setting a setTimeout() or setInterval() function. These allow you to assign a certain task to happen after a set amount of time. The timer runs asynchronously in the background, allowing you to continue using the interface while it runs. Once the timer is finished, it will then execute the code you assigned. This was very important for getting down the flow and speed of the game. I found it to be a lot of fun and finished this project with a new respect for the JS language.

If you would like to try it out, go to brunchmadness.github.io/HTML and try to get a top score!

I am 34 years old and making a huge career change by attending Flatiron School’s Software Engineering Bootcamp. Excited to learn!