HACKER Q&A
📣 emehex

Learning JavaScript in 2021


I have deep knowledge of Python, and lots of experience with Swift... I'd like to learn JavaScript but don't know where to start!

Should I learn TypeScript? What the hell is ECMAScript, WebPack and Gulp and React? How do I even setup a development environment? Do I need Node? What even is Node?

I'm motivated to learn (just enough) JavaScript because I'd like to build more "complete"/"end-to-end" products and services. What do I mean? Well... I can build iOS apps. And I can build Flask/Fast- APIs that serve ML models. But I can't, right now, build things that use accounts or store data.

I'm working my way through the AWS Amplify docs (to solve for the back end stuff). And I'm starting to familiarize myself with GraphQL. But it seems as though I'm going to need to pick up some JS along the way.

So, how should I get started?

I'm not sure "JavaScript: The Definitive Guide (7th Ed)" would be an appropriate place to start as I know what a Class" is, and I don't want to read 40 pages on Types.

Thanks!


  👤 acemarke Accepted Answer ✓
I recently wrote a "How Web Apps Work" series that covers the common terms, technologies, and concepts that are used in web dev. It's a bit more oriented towards the front-end / JavaScript side of things, but covers some information on both ends. I'd suggest reading through some of that as a starting point to get the lay of the land:

https://blog.isquaredsoftware.com/series/how-web-apps-work

I also have a "JS for Java Devs" slideset that provides a cheatsheet-style overview of JS syntax and concepts, as well as summaries of common JS ecosystem tools:

https://blog.isquaredsoftware.com/2019/05/presentation-js-fo...


👤 johntdaly
If you already know Python don’t go with something like JavaScript: The Definitive Guide and just go for some basic tutorials. JavaScript is a tiny language with nearly any base library at all. You should be able to get learn the basic syntax quickly. Stay away from TypeScript unless you come from Java when learning. You can look at it later once you’ve got your own bearing.

I would also recommend Next.js as frontend framework. It is React and WebPack based, you can get started quickly and what you learn from it can be applied to other projects.

For the backend just install Node.js (you will need it anyway) maybe look for NVM if you are on mac or linux or nvm-windows if you are on windows.

Once you feel somewhat comfortable with with the syntax you can take a look at eloquent javascript. The book is online, if you like it you can support the author by buying the book but you don’t have to.

Small tip, if you know programming already books like “The Definitive Guide” are not good for learning something new. Giant tombs like that are interesting when you are a total noob, at any other time they will just slow you down when you are trying to get into a new language. Some of those tombs can be interesting once you get well acquainted with a language and might need to look up edge cases but you are not there yet.

Hope this helps and have fun.

https://nextjs.org/

https://developer.mozilla.org/en-US/docs/Web/JavaScript

https://eloquentjavascript.net/


👤 schwartzworld
You can learn to write modern JavaScript in a browser console or a single script tag just fine. There IS a lot of nodejs based tooling to overcome problems with the strategy, but you don't need any of that to start.

Find a modern JavaScript tutorial (if it tells you to declare variables with 'var', look elsewhere) and just start building. The browser has everything you need to create a dynamic page. There will be pain points, but once you understand them, frameworks will make a lot more sense.

GraphQL is a garbage tech, btw. The hardest part of frontend is knowing what trends are useful, and gql isn't really useful unless you are facebook. It just adds mental overhead.


👤 zzo38computer
ECMAScript is the standard of JavaScript.

Node.js is a program that can run JavaScript progams as command-line programs, and includes its own library of functions such as file system, cryptography, compression, HTTP(S), etc.

The other stuff you mention I don't know, but hopefully someone else does and can answer your question.