DEV Community

Lucas H.
Lucas H.

Posted on

Is JavaScript a hard language to learn? (and other things)

In a rush? I've marked the questions with bold to make it faster to read, don't mean to waste your time! :)

Hi everyone 👋, hope you're having an amazing day. My name is Lucas, I've been learning Javascript recently. I'm quite new to developing, and I was wondering, is JavaScript said to be a hard language generally, and if not, what would be some languages that are identified as 'hard'?

Now that we're on the topic, I'd also be really interested if any of you have any amazing resources you would suggest for learning JavaScript. So hard I've found pretty awesome myself. How condensed the information in each tutorial is and that it is well-edited is great. The speed and quality of each tutorial allows you to grasp relatively hard concepts to learn quickly.

I'm really curious to see your answer(s)! 👀

EDIT: thank you all so much for your responses!! I REALLY appreciate it!

Discussion (13)

chrisachard profile image
Chris Achard

JavaScript definitely can be difficult to learn - but it can also be one of the easier languages to learn; it's mostly about how you try to learn it, and what you try to learn.

I think there are three main problems with learning javascript:

  1. It can be used to do so much now. Backend, frontend, frameworks, libraries, etc - there is just a huge world that you could explore there - but my recommendation is to forget about all of that stuff until you have a good understanding of some basics

  2. There's like 3 ways you can do everything: the "old" way, the ES6 way, and then functional vs non-functional. Those different styles can clash sometimes, and as a beginner - you may find it difficult to figure out which is which

  3. Javascript does have some warts which can make it difficult. What this means at any given time, type coercion, variable scoping... (etc). That all makes it a bit tricky

So! My major recommendation is to do two things:

  1. Focus on the fundamentals. Javascript has variables, loops, if/else, etc - just like any other language. Start there and ignore frameworks first.

  2. Find a project you are really interested in, and work on that. Just figure out the "next thing" you need to know to complete the project, and go from there.

Hope that helps!

And oh yeah - as an egghead instructor myself, I can say that egghead is great :)

lucashogie profile image
Lucas H. Author

Hey, Chris! Thank you so much for your response. And it's so cool that you're an instructor on Egghead (and thank you for being one, I appreciate you)!

ahferroin7 profile image
Austin S. Hemmelgarn

Given that you're new, probably not very if you can find a good tutorial, but that doesn't mean it's a great choice for a first programming language.

Put simply, JS is different. Not bad, not hard, just different. It has a lot of peculiarities that aren't present in other languages. That can make it a challenge for experienced developers to learn the language, and can also make it challenging for new developers who started with it to branch out into other languages (the this keyword, the whole null/undefined insanity, and the prototype-based object model come to mind as the three biggest peculiarities here).

As far as resources, I don't have any good ones to suggest for learning initially, but once you're actually using it, especially for web development, MDN is an indispensable resource for looking up information about the Web APIs.

andrewbrooks profile image
Andrew Brooks 👨‍💻

JavaScript can be a language that can really make you go wtf if you don't take the time to understand the mechanics behind how it works.

A great read to demystify JS is You Don't Know JS. It helped me a great deal and I still reference it from time to time.

pclundaahl profile image
Patrick Charles-Lundaahl

I came here to say this, as well. Reading and taking the time to really grok You Don't Know JS was a major turning point for me.

lucashogie profile image
Lucas H. Author

I actually tried YDKJS but I found a lot of the language and explanations confusing. Might give it another shot sometime tbough..

Thread Thread
pclundaahl profile image
Patrick Charles-Lundaahl

It's definitely for when you're ready to understand how things behave under the hood. I guess a lot of that isn't really super necessary early on, though!

I was going to say, don't be put off if something doesn't click right away. There's an absolute mountain of stuff that made no sense to me at the beginning of my journey that became super relevant later on. Keep at it!

kspeakman profile image
Kasey Speakman

No, Javascript is not a hard language to learn. It does have some notorious footguns that you would do well to avoid. The biggest one of these being implicit type conversions. For example. Javascript section starts at 1:22. The way it handles implicit casts means you have to care an awful lot about type equivalence. In particular use === to check for equivalence in type and value. Using only double-equal will silently do an implicit cast if the types are different.

Another honorable mention is JS's numeric type. Floating point numbers in particular do not behave like you would hope. Try adding .1 + .2 and you get 0.30000000000000004. If I need a money calculation, I will send it to the server to calculate and show it on the front-end as a string. Or worst case, I will convert the floating point to an integer (multiply by 10s until the integer has enough precision for your calculation), the perform the integer-based calculation, then convert back to a float (divide by 10s).

These are more-or-less avoidable problems.

The thing that IS hard about Javascript (and front-end in general) is its dev ecosystem. There are a lot of moving parts. Best to look for templates or starter packages at first. e.g. Create {Insert view technology} App.

nijeesh4all profile image
Nijeesh Joshy

Js can be little hard to learn at first. Thats because if you are some one who is coming from c, c++ , or java like languages it will really easy for you to learn the basics because most of the structure is same (like for loops and while loops, if-else, etc ).

But you will struggle a little to understand the event-loops, asyc etc.
Once you have an idea about how Js works. Js becomes a really fun language to work with.

This video helped me a lot understand how event loops work:

alansolitar profile image
Alan Solitar

I don't know it it's necessarily hard, but it is quite different than many other languages in some respects. In particular, some of the more functional aspects of javascript can be confusing, if you are used to more object-oriented paradigms.

weptim profile image

Traversy media vanilla javascript crash course on udemy

felipperegazio profile image
Felippe Regazio • Edited on

I think is a matter of ask yourself first:
What i want to do with javascript?

I think the language itself is pretty simple and easy to achieve a basic knowledge

Now, your goals will define if javascript is easy or not for you.
If the ideia is get a job as a junior dev, if you want to build a product, is just for fun?

I think that matters.

But at the end, programming itself is hard, and i think thats a big part of the pain & fun :P

pclundaahl profile image
Patrick Charles-Lundaahl

I'd personally say I found learning to be productive in Javascript to be easier than in Java, and substantially easier than, e.g., C or C++. However, I feel like there is a much wider range of applications that you would use JS for, so I think a lot of that came down to learning how to organize code for different project scales.

I would say that JS has a lot of strange mechanics under the hood, and it definitely took me a long time to start getting really comfortable with them. Expect it to be an ongoing journey (though a fun one!)

Good luck, and enjoy the ride!