Why JavaScript Is So Difficult And How I Finally Understood It?

Nika Kharebava
4 min readApr 1, 2022

--

“How I started to like JavaScript” or “From hate to love in one step”.

JavaScript

I think most of us got this feeling that our studies are not going well and something is really difficult to understand. This was my case about JavaScript.

At the very beginning of my web development career path, I was really doubting that one day I could finally understand this programming language and it was really hard for me. This day has already begun.

In this article, I would like to share my story about how I passed from hating JavaScript to finally loving it. (yes it exists)

1. Vanilla JavaScript

It is not a secret that Vanilla JavaScript is the base of all the JS Framework and is really must learn but… it is also very confusing.

To be honest, while learning it, I was not able to realize even a small task how much I did not understand it.

The problem with Vanilla JavScript is a big amount of code lines that become really messy on some big projects or even when you try to do some exercises.

That’s why, in the past, the best solution about it was jQuery, which made the situation a little bit easier but now it is replaced with other Frameworks such as VueJs, React, and Angular.

2. Understanding the DOM

I am sure you have already heard about the DOM and that eventually to understand JavaScript, you have to understand the DOM as well.

Why it is important? Well, let’s imagine that you have to create a button and when you push on this button something happens.

Sounds easy but not for a beginner.

By using JavaScript you have to actually, first find this button in the DOM by its id or by its class. Then you have to add an event on it and when this event is happening you have to create a function that will actually tell our website what should happen after the click.

That makes a lot of lines of code just for a small action but it is very important at least to have an idea about how it is working.

And that is what JavaScript is all about. A bunch of functions, events and elemnts that you search by id or a class.

3. Memorizing everything

Do not try to memorize and fully understand everything that you see in your lessons about JavaScript. Believe me, it is very easy to forget it and to be confused about all of this information.

Try to act, step by step.

What is actually important is to know that with JavaScript you can do one or another method.

For example, you may not remember how exactly to loop inside an array but you know that you can totally realize it with JavaScript and you are sure that it is possible. The only thing that you will have to do is just to google this method and apply it.

4. Examples

I think the main problem that I got while learning JavaScript was actually a lack of real examples.

There are a lot of calculators, weather apps, and other exercises but honestly, when you would have to create a calculator in real life? Until now, I have never done it in real life.

What is important in this case is to try to create those real situations by your own. You can think about an eventual problem or feature and try to solve it by googling a solution in JavaScript.

5. Frameworks

I know that it is written almost everywhere that you shouldn’t start learning a framework until you know some basics of JavaScript and it is true.

Attention: You have to know the basics and not to learn the whole JavaScript by heart.

When I first started to work with the Js frameworks (VueJS, React), my level of JavaScript was still “I don’t get it at all”.

It is exactly the frameworks that made me understand it better but their easy performance. Instead of looking for a button in the DOM, you can just apply a click event on it immediately.

And even in the frameworks, you can still use plain JavaScript in some situations when necessary.

It made my life really easier and I think that’s when I started to like JavaScript. 😊

Conclusion

I am not scared of JavaScript anymore and by following this little advice, maybe you will also understand better.

Everything is coming with practice and the want.

Don’t give up 👍

Thank you for reading this article and do not hesitate if you have any questions.

--

--

Nika Kharebava
Nika Kharebava

Written by Nika Kharebava

Front-end developer specialized in Vue.Js framework. Writing about web development, side hustles, and motivation. 🌟

No responses yet