r/learnjavascript • • Jul 03 '26

Beginner's Luck

Should beginners learn JavaScript just for web development, or learn the language more broadly?

Hi everyone,

I'm a beginner trying to figure out the best way to learn JavaScript.

Most tutorials teach JavaScript in the context of building websites (HTML, CSS, DOM, etc.), but JavaScript has grown into a much broader language with things like Node.js, backend development, desktop apps, mobile apps, automation, and more.

If you were starting from scratch today, would you:

Learn JavaScript mainly through web development first, then branch out later?

Learn JavaScript as a general-purpose programming language first (fundamentals, algorithms, data structures, OOP, async programming, etc.), and then apply it to web development?

Which approach builds a stronger foundation for a complete beginner, and why?

I'd love to hear what worked for you and what you would recommend to someone just starting out

8 Upvotes

27 comments sorted by

View all comments

Show parent comment

1

u/TheRNGuy Jul 04 '26

JS actually got querySelector because of JQuery. Previously, there was only getElementById. 

1

u/azhder Jul 04 '26

No, JS didn’t get it, the browser did. You have to make a difference between what is the language and what is the environment.

I am speaking about the language. What the environment exposes in the browser might be missing in Node.js, but the things you can do with JS you can do in both.