The One Reason Why Beginners Struggle in JavaScript

Subscribe to my newsletter and never miss my upcoming articles

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:

  • Variables
  • Functions
  • InnerHTML
  • getElementById
  • Style and className
  • querySelector and
  • querySelectorAll
  • If and else statements
  • Objects and Arrays
  • 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:

Projects Can Sometimes Be the Worst Way to Learn JavaScript

Simple Steps Code - Learn JavaScript

Caleb H.'s photo

In my personal opinion, as someone who has learned over 10 programming languages, I would suggest learning the concepts of programming in a more generalized way, and then learn the specifics of the language from there.

Like if you want to learn a real language - Spanish, for example, it's better to learn the grammar first, and learn the vocabulary as you use it more.

Show +1 replies
Caleb H.'s photo

Co-founder of High/Low

Well, CS50 is good if you're wanting to learn computer science. However, CS doesn't actually teach you how to program, it's more about algorithms and data structures.

Khan Academy is where I first learned. They do a great job teaching JS, and their SQL course is pretty good as well.

The only downside is that they never give a good explanation of web frontend/backend and how web apps actually work. Because of this, I spent at least a year thinking frontend was all there was.

I did write a post explaining frontend/backend the way I wish it had been explained to me. Maybe you'll find it useful: naclcaleb.hashnode.dev/web-application-stru..

Mohammed Asker's photo

Thanks for providing your insights. I'll be sure checking it out after I finished my practice today.

Ieva Broberg's photo

Thanks for sharing this! I totally got trapped in the simple yet too difficult trap when learning JS, this is very relatable!