HACKER Q&A
📣 philonoist

How should one go about learning JavaScript?


For futureproofing himself in his career.


  👤 johntdaly Accepted Answer ✓
Do you already know HTML and CSS? If not, you might want to get that squared away. HTML shouldn’t be that hard and don’t go to far into CSS since you probably won’t do much CSS work later on.

You might be able to pick a book that teaches you “Web Development”, so HTML, CSS and JavaScript. If you go with one of those books make sure it is not to old and be aware that you will still not know enough afterwards.

After that you got to chose Front-end, Back-end or Full-stack development.

If Front-end, pick a framework. React and Vue are popular, Angular and Ember are more likely to show you that there is more to a framework.

If Back-end, learn express. Just about everybody uses it. You can also look into nest.js as a framework. It does more than express but fewer people use it right now. You will also need to add a database to the mix. Choose either MariaDB or MongoDB, there are other valid choices but those two are rather popular so you can find information and get a job with the skills you develop. You might also want to look into working with JSON, CSV and XML files. You will need to read and write them.

If you go Full-stack you will need to learn Front-end and Back-end. You will also need to learn how to debug errors across the stack and where best to solve a problem. You might also want to add next or nuxt to your tool belt.


👤 brudgers
I like, JavaScript: The Definitive Guide but cannot speak to its career importance.

I bought it (a used older copy) because it was about $5 and 1000 pages...and though that's reason enough to like it, it isn't the reason I am bothering to write about it...phone books used to be free and longer to digress.

What I like about it is it makes and is organized around a simple conceptual (and practical) distinction that you won't see in discussions of and tutorials on Javascript.

Javascript is a language and a set of API's (originally into the DOM, expanded with Node). It is the Javascript language -- ok ECMAscript -- that has the atypical object model and a not suitable for financial calculation numeric stack.

That's important, at least to me. I can hum along with javascript when I need to because I can read and write Javascript when I need to and then StackOverflow in the API details.

Details like collections in the DOM API. Which are important, but not part of the Javascript language (at least I don't think they are).

Anyway, find an old copy for a few bucks and you will at least have a place to start. Good luck.


👤 genezeta
It depends a lot on what your starting point is. That is, the approach will be different for someone who maybe isn't a programmer at all ATM, or for someone who has some experience with some other language, or has fairly extensive experience with other languages but none or little with JS. Or any other circumstances.

For someone with no programming experience at all, there are various opinions on what your first language should be, but in any case there's abundant material and courses that teach general programming using JavaScript.

For someone with programming experience but not JavaScript. Perhaps some of the stuff [1] written by Axel Rauschmayer may be good. Or maybe some other resources like "The Modern JavaScript Tutorial" [2] or this other one [3]. I used to recommend Eloquent JavaScript [4] also. I do think it is a good book, but feedback from various people indicates that is clearly not for everyone, so YMMV.

MDN (Mozilla Developer Network) is something you should keep at hand, but more as a reference than as a guide. It does have some learning guides [5], but in general I wouldn't recommend them that much. Still, do keep a link to the MDN as it is a very good reference to go look for specific explanations (sometimes).

All of those mentioned above will generally help you learn the language, which is what you should probably do first. My recommendation would be to have a first look at the links and choose something that matches your learning style. Still keep the others, since sometimes a combination of different explanations will make things easier to understand.

I haven't mentioned any libraries or frameworks. I know there are some courses out there which very quickly throw you into focusing on some framework or other. Personally, I would recommend against that, if your intention is to learn JavaScript well. At least initially.

There are also some "JavaScript Roadmaps" out there. I mean stuff that looks like this one [6] -but not that one, which is for frontend development in general-, a huge chart/list/map of concepts and ideas that are supposed to cover "everything you need to know". I would not recommend following those. While they look impressive and pretty, they can also feel overwhelming while not providing any particularly good path to follow.

[1] https://exploringjs.com/

[2] https://javascript.info/

[3] https://learnjavascript.online/

[4] https://eloquentjavascript.net/

[5] https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Fi...

[6] https://roadmap.sh/frontend