— 4 min read
In this post, I am going to talk about how I build my first JavaScript project and also share everything that I know and the resources that I've used to go from zero to intermediate level.
I am doing this because as many of you may know, learning JavaScript as the first programming is extremely hard and I struggled so much to learn it. It's from my hope that by sharing my journey that you'll be inspired by it and continue to learn JavaScript knowing that you're not alone facing this challenge.
The very first thing I did to get started learning JavaScript is by watching a YouTube video called JavaScript Crash Course for Beginners by Traversy Media.
I choose this video precisely because this video taught me the basics which are enough to start practising on my own and I wasn't looking for a complete and comprehensive tutorial at the time. Also, it was from the same channel I used to learn HTML and CSS from the very beginning and helped me to learn basic concepts of web development.
When I finished the video, I was stuck - I don't know what's the next step to take my JavaScript skills to the next level. I'm not feeling confident enough to build projects right away since I have absolutely zero ideas on how to incorporate these JavaScript methods and concepts that I just learnt.
I mean what am I suppose to use Variable for? And Objects? And Loops? And what about Arrays? These concepts are not hard to understand when thinking them in isolation. But when it's time to implement these weird concepts into the projects, this is where the real problems start happening.
To put this in another way; I don't know how to apply JavaScript into real-world use cases!
I was practising JavaScript mindlessly when I come across a video where the first "Aha moment" occurred and changed the direction of my JavaScript journey. This video is called Learn JavaScript in 7 Minutes by blondiebytes. (A tutorial, again? Seriously? I know, I know - But hear me out)
This short video explained JavaScript concepts in the simplest words and clearest examples possibly I got. The real gem is in the codes itself. In one of her examples, she hid the text with CSS and by using JavaScript, she revealed the hidden text by clicking the button.
Simply put, I was introduced to the world of Document Object Modal, or DOM for short. Why do these matters? Because for the first time since I begin to learn JavaScript, I start to connect the dots!
With DOM and event listener, I can attach HTML with JavaScript and use it to modify the elements based on my wants. And when I want to modify the elements logically, this is the moment where the programming fundamentals starts to fall into place.
Tired of repeating the same codes again and again? Use variables to reference the codes and save your time for more important things. Want the action to happen to the web page or HTML elements? Use functions to fire the events. Want the event to happen it conditionally? You guessed it - use if/else statements to do the actions if the conditions are true or not.
The second breakthrough happened when I read an article about why building projects can sometimes to be a bad idea for beginners. This article is very insightful, but to summarize, building projects right after tutorial will overwhelm you and may cause to quit learning JavaScript.
What they recommended instead is to build very small projects that do very simple functionalities. I downloaded a free JavaScript ebook from the same author and I used it as a guide to learn JavaScript effectively.
Using this approach and what I've learned from that 7 minutes video, I created a small game called JS Dojo and it was around that time where I meet the tech community on Twitter using the #100DaysOfCode and #CodeNewbie hashtags. These communities are indispensable to complete this mini-project.
After months of building and abandoning many small projects, read countless articles and forums from Medium, SitePoint, FreeCodeCamp, and Reddit, and unlimited support from the people on Twitter, I am ready to build my very first JavaScript project and I decided to build the note-taking app.
I borrowed some code snippets from my learning projects to use it as the foundations, but otherwise, most of the functionalities and styling are done by myself and have consulted Stack Overflow and Twitter for help whenever I got stuck for more than a day.
It took me almost 3 weeks to complete it and while it still has bugs and maybe ignoring best practices, I'm very happy with the results and add it in my portfolio.
My journey of building a first JavaScript project has taught me so many valuable lessons and these takeaways from the lesson:
And before I wrap up, I just want to say no matter how hard it will be, you can without a shred of doubt, learn JavaScript! You can do it!
Here is the list of all resources that I have personally used them to help me learn JavaScript. Without them, I've probably had never made this far: