The One Reason Why Beginners Struggle in JavaScript
Tags: javascript, beginners, webdev
Published: 2019-07-02 12:36:39

It's been one month since I begin learning JavaScript. Yes, I know the first month is nothing and it will probably take me 6 months or more before I start grasping the concepts of JavaScript.

I know the syntax. I know what the concepts like variables, functions, if statements, loops, etc, are and what it does.

Okay, that's good and all. But here comes the questions:

● Do you know when and when not to apply them?
● Do you know what you are going to use it for?
● Do you know what tools or features you need to build your project?

No? Then you are suffering from a lack of context.

**That means you have no idea what to do with the knowledge you've gained from the tutorial and less likely to practice it, hence you're going to forget it all.**

Even if you practice it every day, you're having a hard time building your project and the so-called simple projects like to-do list, slides, and calculator are surprisingly hard.

You might think programming is not for you and will give up on your dreams of becoming a Software Engineer.

Now that you understand what the problem is, it's time to find a solution. It's not my original idea and until recently, I was stuck in the learning loop - until I read the article and guide which I provided in the links below.

Finally, I found a path that might be a breakthrough moment for newbies. In other words, a way that will take you from a beginner programmer into an intermediate programmer.

All you have to do is change the approach of learning JavaScript. I don't know what methods you've used to learn HTML and CSS, but it may not necessarily work for JavaScript.

Instead of watching or reading tutorials and then jump into projects right away; first, you need to fully understand the concepts of JavaScript.

Without it, it will be nearly impossible to build it on your own and guided projects are not exactly helpful in building retention which you will feel like you haven't learned something.

There are eight concepts you should learn as they are very practical and can be used immediately to build your small project. And they are:

1. Variables
2. Functions
3. InnerHTML
4. getElementById
5. Style and className
6. querySelector and querySelectorAll
7. If and else statements
8. Objects and Arrays
9. onclick

Learn one thing at a time. No need to rush quickly. Take all your time you need to really understand how does it work and why they work in a certain way.

The most effective way to understand the features is to build a task or mini projects. For example, use the function to change the colour of the paragraph when you click the button.

Your primary goal is to spend time coding JavaScript as much you can while also using as less HTML and CSS as possible. (I know, they're important to practice it, but the point is you're delaying yourself to sharpen Javascript skills).

Once you have understood how each features works, you will start to have some ideas of which small projects you think you can build with.

And because you took the time to understand the basic features of JavaScript, you are more likely to be able to complete the project.

And lastly, please do not use frameworks or libraries yet. You don't need them right now and your only job as a beginner is to improve Javascript skills and then you can jump into any frameworks of your choice.

Besides, knowing Vanilla Javascript will make it easier to work with frameworks, therefore it's totally worth putting a lot of effort into learning it.

I hope you find this article helpful and happy coding!

For additional sources:
● https://www.sitepoint.com/projects-can-sometimes-be-the-worst-way-to-learn-javascript/
● https://simplestepscode.com/learn-javascript/