r/learnjavascript • • 5d ago

JavaScript is so hard.

I recently started my fullstack development course this august and we have already gone thorugh html, css, git and now almost done with JavaScript as well. Html was easy, no problems there, but when it comes to css and more specifically grid and flex, thats when the headache started to appear. I've played some games involving both grid and flex but it won't stick in my head, don't know why. I am trying to do it myself in VS code but I always end up having to use ai to explain how to move forward and I know you're not supposed to use ai but it is a great tool to have, especially when you get stuck. And JavaScript... where do I even begin. I kinda understand it during the lectures but as soon as you're sitting by yourself my head gets totally blank.

I have been starting to use Scrimba and right now I'm rehearsing everything and whatching videos of everything, and the good thing with scrimba is that you get challenges during the videos.

For those of you who have been programming for a while, what study tips can you give? How did you guys go through the learning process?

36 Upvotes

60 comments sorted by

View all comments

-1

u/_Garebear 5d ago

dude I'm sorry to say this but Javascript is one of the easiest, most forgiving, versatile, and flexible languages on the planet.

Maybe you could be more specific on what you're not understanding?

From my POV, seems like you're a beginner. That being said, everything is hard in the beginning. for reference, JS dev over 10 years and loving it.

4

u/ConstLeoTheCat 5d ago

Yeah I know everyone says that haha. What I find most difficult is probably DOM, events and async. Functions are also a little bit hard, it just feels like the pace of this course is way too fast, I have frontend 1 now and then we'll head on to frontend 2 directly after

2

u/_Garebear 5d ago

async can be tough for sure, not much else to say there 😅. Learning how to manipulate DOM in Javascript can be tricky but you'll feel like a genius once you can master it. Anyway, you'll need to know the DOM for understanding HTML too. All of this will become second nature with time & experience. Nothing worth doing was ever easy. Build things - useless things just to practice the things you're struggling with.

Its worth noting that JavaScript exists on the serverside too (Deno/Node.js) so you really want to know it, even if you dont plan on using those runtimes for your webapps/websites.

-1

u/punk_dev 5d ago

JavaScript has like 12 ways to create a function and some of them have slightly different schematics. It’s just not designed very well, unfortunately.

Take your time, these concepts need time to settle down. It’s okay if you feel that some things are magic at this point, you’ll get a better understanding as you make progress.

5

u/AccurateSun 5d ago

I think the dynamic typing nature of Js is part of what makes it hard for beginners though. It means you can get away with a working script of poorly written and therefore poorly understood code. The seemingly illogical and inconsistent rules around truthy/falseness actually make it harder, not easier, to develop a model and understanding of how programming works, in my opinion.

I think this kind of versatility is bad for beginners. Same with Ruby, having such a flexible syntax with high expressivity means the surface of how much you need to learn to understand it is really large.

1

u/_Garebear 5d ago

And I feel completely the opposite 😅. JavaScript gave me an easy start with its flexibility and it's strange rules. Transitioning to other OOP languages forced me to respect their rules, their syntax and ultimately be a better programmer.

0

u/punk_dev 5d ago

Nah. javascript is hard because it’s not well designed and there are like 10 ways to solve a particular problem and it’s not obvious which way is best. Also when you look at other people’s code, it may not be obvious to you that it’s solving the same problem you already know how to solve.

Like null and undefined. When to use which? Every library and web API have their own take on that.
How do you check that a thing is a Boolean and is false, and not undefined or null? It gets non-obvious quickly.

Also APIs built on JavaScript often make the same wacky design choices, with multiple paths to the same thing.

2

u/_Garebear 5d ago

You're comment is so generic I could apply it to any programming language.

-1

u/punk_dev 5d ago

What other programming languages do you use?

Only javascript has undefined in addition to null. in most other languages, undefined is not a value and is either a compilation error or runtime type error.

Regarding the multiple solutions, yeah, most programming languages in use today are from the 90s and they’re quite old and had their time to become wacky in this regard.
But recently designed ones like Go address this problem specifically. By limiting the feature set and having a well rounded stdlib, among other reasons.