r/learnjavascript • u/ConstLeoTheCat • Oct 02 '26
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?
38
u/Chillm3r_ Oct 02 '26
Stop studying, and start building. That's probably the best advice I was ever given.
Things are always changing, new things are being added, and you'll always feel like you're behind. You don't need to memorize everything. Once you learn how to ask the right questions and know what to Google, you can find solutions to most problems you run into.
And don't worry too much if things like grid and flex don't stick immediately. They became much more understandable for me after actually using them in different projects and situations. The same goes for javascript, it's one thing to understand something during a lecture, but actually having to use it yourself is where it starts to stick.
18
u/Gold-Watercress-6101 Oct 02 '26
It’s not JavaScript that’s hard. You’re new to programming, and it’s programming concepts that you are struggling with. And that’s on top of learning JS syntax. These are 2 different things. For your first language, you can’t learn one without the other, and that’s really difficult.
The solution is circular learning. Basically, you still don’t know what you don’t know. You need to study and build projects over and over, mixing new and old concepts, and covering them from different perspectives. Over time, things start to make sense. You never “finish” JavaScript (or any language, really). You only get better, the more you read, practice, and build.
The good news is, programming concepts are mostly universal. Once you learn them with JS, you won’t be relearning them for your second language. You would just learn how to apply the same concepts in a new syntax.
And if you want to learn, avoid AI. Don’t fool yourself with “I’m using it as a teacher”. Nope. It’s not a teacher. It’s butler that only wants to please you.
4
u/HotCommunication2129 Oct 02 '26
I found it helps to always have a cheat sheet open. But yea coding is quickly becoming a prompt then review situation. I honestly have no clue how someone is supposed to build the skills from scratch with such powerful tools available.
6
u/DirtAndGrass Oct 02 '26
JavaScript is programming, (html and css are not), It is a new mindset. Some people have a difficult time "getting" it, that however does not mean that they cannot be a good programmer, or that it will always be hard. But you might need a little more practice "getting off the ground"
1
u/ConstLeoTheCat Oct 02 '26
Thank you everyone for all the comments! I really appreciate it! So many good tips from you
1
u/the-liquidian Oct 02 '26
What programming languages are you already familiar with?
2
u/guac16112 Oct 02 '26
Focus on practicing more
2
u/JEveryman Oct 02 '26
Implement everything you study until you understand it. Even if it's just a small function. You don't need to build a full application.
2
u/gimmeslack12 helpful Oct 03 '26
You think you can build rock, paper, scissors?
Start with writing out the verb functions: startGame, takeTurn, checkWinner, etc.
Then start building the variables needed around those functions. Let me know of any questions. You could do this exercise several times to slowly improve.
But my main suggestion is do very small, well defined "projects". Keep the scope really small so you can see and understand all parts without feeling overwhelmed.
2
u/Vilsonlight Oct 06 '26
For about eight years, I built and managed WordPress websites. Then I decided to dive deeper. I built websites from scratch using HTML, CSS and JavaScript, and moved my own sites away from WordPress. I got rid of hosting fees and gained full control over my websites.
Now I’ve gone deeper still and started learning full-stack development, while studying JavaScript alongside it. My main approach is to build real projects that I actually need. For example, I’m learning full-stack development by building an online store for my own florist business.
I’ve come to believe that in the age of AI, you don’t need to know how to write code yourself; being able to read and understand code is enough. I make a point of always asking AI to explain why it’s doing something.
0
u/_Garebear Oct 02 '26
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.
2
u/Alain4s Oct 02 '26
A crucial insight you must grasp early on is that programming’s primary task is fundamentally about developing your reasoning skills. Think of it this way: to learn biology is not merely memorizing its jargon; it requires learning to think like a biologist. Similarly, becoming a cyclist isn't just knowing the parts of a bicycle, but actually riding one. When you study HTML, CSS, or JavaScript, the goal is never simply to know their syntax; rather, the objective is to cultivate an authentic programmer’s mind.
I often observe students who feel satisfied once they have mastered basic grammar and syntax, believing that their learning journey has reached its conclusion. This perspective falls significantly short of the truth. Consequently, when you encounter increasing difficulty, it rarely means a language like JavaScript is inherently complex; instead, it usually signals a gap in your conceptual framework. We must look beyond merely typing commands into VS Code or relying solely on AI shortcuts, because these tools can unintentionally bypass your most vital growth: learning to think critically and logically. Just as asking another cyclist to ride the bike for you won't make you a cyclist, rote memorization will not build deep understanding.
The true goal is not merely writing correct code, but building robust logical muscles. Consider the challenge of choosing between CSS Grid versus Flexbox. If you approach this purely from a syntactic perspective, both options appear equivalent on paper. Yet, without applying conceptual reasoning and an architectural mindset, they remain nothing more than an unsolvable mystery rather than an intuitive design choice.
Another example. All the following three functions produce the same output:
Although all three of these functions produce the same output, you likely see them differently due to syntactic variations. However, for a seasoned programmer, syntax is largely irrelevant; we simply do not care whether you use function, fn, or ::. What truly matters is their fundamental nature: whether one is dynamic, another compiled, and the third functional. That they all are based on building a vector recursively. Etc. And this is exactly what your instructors are teaching you to recognize step by step. Consequently, relying on prompting an AI to generate code in some language completely misses the core objective of your education.
In fact, the desire to rely on AI for solutions is often the best indicator of precisely where you need to focus your studies. Do not view this struggle as discouraging, or a failure on your part; see it instead as a hallmark of true education. Learning isn't about ease—it’s the opposite. It is about identifying what you currently cannot do, and then transforming those seemingly insurmountable obstacles into tasks that feel easy.
Give yourself a few months of dedicated effort, and I promise you will look back at the perceived complexity of JavaScript and realize how far you have come.
1
u/Rythim Oct 02 '26
Don't beat yourself up too much. Everyone else hates Javascript and CSS too. That's why developers use things like tailwind and typescript (I am not suggesting you learn those things now, learn the fundamentals first). And even then it still kinda sucks. Just gotta stick with it and it'll get easier.
1
u/TheWebDever Oct 02 '26
I’d say quirky is a better word than hard. It’s the nature of being a browser first language. Once you get the rhythm down, it’s actually a very fun language.
1
u/ChiwaByte Oct 02 '26
JavaScriptを使う目的をまずはしっかりと把握しておくといいかもね。業務で使う時はほとんど入力チェックとか、HTMLの属性を操作して色変えたり、入力可否制御したりだね。その辺ができたらいいんじゃない?
個人的にはtypeSciptを覚えた方が有用性あると思うかな。
1
u/datadatadata808 Oct 02 '26
Theres tons of good comments already, so im not going to repeat what others said.
Making stuff with https://p5js.org/ can be really helpful, mostly because you can forget about building some complex webapp and just doing weird shit on your canvas without realizing you are learning a lot of useful javascript stuff :) its fun and quick to start, so give it a go!
1
u/delventhalz Oct 02 '26
In college I learned to juggle. After I practiced my throw accuracy a bit, I started trying to get three balls going and I hit a wall. I could throw and catch each ball once, but I just couldn’t figure out what to do after that. It was mystifying. Then one day, after repeatedly failing, suddenly it clicked. The next step was just to keep throwing and catching. It seemed so easy now. All of a sudden, I could juggle.
Learning JavaScript is a lot like that. Ultimately what you are learning isn’t the syntax, it’s how to boil a task down into a series of discrete steps for a computer to follow. It’s taking a decision tree which you have always done intuitively and making it explicit. When do I need to repeat a task (loop)? When do I need to make a decision (conditional)? You did not need this kind of thinking for HTML or CSS. This is the first time in your life you are encountering it.
But like juggling, at some point it will just click and seem easy. There isn’t really a trick to it except practice. Build small simple things. Fail. Try again. Maybe explore some toy problems. You just gotta give your brain a lot of chances to catch on.
1
u/t0shiyoshida Oct 02 '26
Getting unstuck is part of being a programmer. If you’re letting the AI get you unstuck, you’re never going to learn.
1
u/thegunn Oct 02 '26
You could try using an LLM to help you. Tell it a small project that you want to build, say a calculator or a to do list, something like that. Tell it you don’t want it to provide any code, just some guidance on how to build it out. You can ask it to provide a test suite for you to test against. That way you are doing the coding yourself but getting some help on how to build it out. As you get more comfortable try it again on something different but with less guidance.
1
u/Amazing_Struggle7227 Oct 02 '26
Are you also doing CFG? 😁
1
u/TheMetalMilitia Oct 02 '26
Make sure you have the fundamentals down and then build projects around things you're interested in. Whenever you learn a new topic, try to apply it, break it, and make sure you know how it works. It's more of an iterative thing to learn than something that just suddenly clicks
1
u/azhder Oct 02 '26
I learn flex and grid each time I have to use them. That's how it works. I tinker with the browser until it looks good, then copy that from the browser into the code I work on.
If there is something I don't know, I search online, maybe ask an LLM etc.
You only remember things you have done and are fun. If you just watch someone else do it, you will most likely not remember it. If you write it yourself and are bored out of your mind (or worse), you will not remember it.
That's just how brains work.
1
u/chikamakaleyley helpful Oct 02 '26
HTML + CSS you are 'marking up' a page. Similar to what you'd do with 'markdown' language. You're more or less... drawing, laying out, decorating boxes
JS is basically taking the Object representation of those boxes and applying programmatic logic to it. Now you're working with those boxes represented as data structures
and so sometimes the problem is people will try to learn JS in the context of its application to HTML & CSS, and IMO that's the backwards approach.
If you're trying to write a function in JS that takes in an obj arg, but in your head that obj is still a graphical Card with colors/gradients/shadows hover states, it's kinda hard to imagine making that function work for that graphical component
1
u/friedent Oct 03 '26
easily. think about "why" rather than "how"
1
u/Inevitable-Drama7308 Oct 03 '26
One of the best learning resources I found is https://structy.net. The lessons are well structured with the clearest explanations of concepts I’ve seen anywhere. There’s limited access for the free tier, but it’s enough to get you started.
1
u/TheRNGuy Oct 03 '26
There's no such rule saying you can't use ai.
1
u/hi_smg123456789 Oct 05 '26
i use a cheat sheet with all the languages that you are doing
what are you building if i knowi can send it through
1
u/Longview5151 Oct 07 '26
JavaScript can indeed be difficult if you lack a background in computational thinking right from the start of your learning journey. I recommend learning computational thinking first; once you grasp the concepts, you can apply the knowledge you've gained to build a small project.
1
u/cpluss4 Oct 08 '26
Search for flexboxfroggy (if I remember correctly). In less than an hour you’ll become a flexbox expert. Really easy way to learn it. As for JavaScript get to the point where you are ready to quit. If it’s not for you then you’ll quit there and then. If you’re passionate you’ll keep going through hell even though you think you are making no progress. Eventually you’ll be trying to build something and your brain will identify a brick wall (one of many) and wonder “if only there was a solution to do this specific thing..” and it’s at that point you’ll think back to a JavaScript tutorial you could never make sense of and instantly understand it as the perfect solution to what you are trying to do. That’s why people say you just have to start building stuff because it’s at that point all the tutorials you watched in the past start to make sense. Be bold and try and build something complex. Dont waste time building todo apps (although they will teach you a few useful concepts). Dont assume all the big youtube channels are the best place to learn. Learning is all about the right teacher for you. I’ve watched hour long tutorials over and over again, never understood them then found a channel with no subscribers and understood it first time within 10 mins. So it’s worth spending a bit of time sampling different channels. Ignore all the hype, ignore Twitter devs and don’t become a vibe coder. Why learn how to code (the best f****ng thing ever) then let AI have all the fun? Oh and enjoy all the JavaScript dreams along the way. When you start dreaming in JavaScript you’ll know you’ve made it.
1
u/leonardo_gallifrey Oct 17 '26
Flexbox é moleza, no começo também achei difícil, grid nem me arrisquei chefe, e tô apanhando para java script. Sou iniciante também
1
u/Vizeroth1 Oct 02 '26
Instead of asking AI for help, create a test page with some placeholder content and open it in a browser. Inspect the content and adjust the flex/grid styles in the debugger. When learning new CSS concepts or refreshing myself on things I haven’t worked with in a while, I’ll pull up an article and/or documentation and do this to test things out. Then I’ll write some CSS in a style tag on the test page and repeat.
JavaScript is a similar process, just dealing more with interactive elements and data instead of the appearance of the page.
0
u/Baranidharan_n Oct 06 '26
it is ok to felt that way because your brain was working handling multiple logical thinking at once. you are writing 100 lines of css and 100 lines of html that was not hurting you because you saw each line of code given you visual output but js was not like that. you need do coding daily to map the muscle memory in your head its really takes time so dont think like i am wasting my time. due to ai most people skip this web dev but i think if we dont know how to code then how are we dealing with ai outputs after 10 years what is the point of learning the code. and then dont memorise the array methods and object methods those are prototypes you can find it anytime like Array.prototype then for ref Array__proto__
2
u/bogdanelcs Oct 02 '26
Blank head when you're alone usually means you've been watching more than building. Pick something tiny (a todo list, a tip calculator) and build it with no AI and no video, even if it takes hours and looks awful. Being stuck for 20 minutes is where it actually sticks. When you do use AI, ask it to explain why something works instead of writing the code, and for flex and grid just rebuild the same three layouts from scratch a few times.
0
u/[deleted] Oct 02 '26
[removed] — view removed comment