I've been trying to learn JavaScript, but I'm finding it really challenging, which is kind of surprising since I hear it's easier than Java. I'm already skilled in Java, and have a solid grasp of arrays and coding basics. I've completed learning HTML and CSS (including flexbox and grid), so I thought jumping into JavaScript would be exciting. However, I find coding in JavaScript to be draining. It's only been two days and I'm already not sure how to approach it. For those who've learned JavaScript, do you just dive into projects or is it mostly about repetition? What's the best way to build my momentum?
5 Answers
It might help if you delve into Object-Oriented Programming in JavaScript. I learned JS first, then Java, and I think understanding OOP made Java easier for me. A different approach might lighten the load for you!
The big differences between Java and JavaScript are in their structure. Java is more rigid with a nominal type system, while JS is structural and much looser. You might just need to adjust your mindset to enjoy JS more. Play around with its flexibility and see if structuring your code like Java helps!
I get what you mean! I learned C# first, and every time I switch to Python, it feels like a brain workout. Each language has its quirks, and for me, C# and Java just click better than Python.
Same here! I struggle with Python’s loose typing. C# and Java are so much clearer for me.
Can you break down what’s confusing about Python for you?
Check out javascript.info; it's a solid resource to get the hang of the language and its browser APIs. Then, start building your projects. That’s how I learned!
I'd say just keep practicing and start doing small projects. After a while, you'll notice that the differences between languages shrink down to just some syntax tweaks. In the end, you usually go with the language that fits the job best, and JavaScript shines in web development.
Absolutely! That moment when various languages merge in your mind is priceless. It feels like a maze until you realize you just mixed up some idioms between them!
Are you referring to procedural programming? Functional programming varies significantly from JS.