I have been practicing my web development skills since the start of 2022, when I got to JavaScript, it was a MESS! I didn't understand what I was doing most of the time and it was frustrating I considered giving up at some point, but I didn't.
I took learning JavaScript at a slower pace than CSS, it was complicated, I tried everything and still didn't fully comprehend it, so I tried the one thing that I haven't; "Reading other people's JavaScript's codes and programs", and it was also frustrating lol, but I noticed that with time I started to understand the scripts better and faster.
I found few key points and patterns that made the code bug free:
- Repeated code lines.
- Most used methods.
- Writing a shorter program.
I began to automatically use these methods on my own scripts without even realizing it.
It was and still is really frustrating, but taking some time to read more code made me write JavaScript faster, I even managed to learn few python basics by just reading codes.
Once I started understanding what the code is doing, writing my own code got easier. I'm not saying this will work for everyone but it definitely helped me.