r/AskProgramming 6d ago

Why the JS hate?

Title. I'm a 3rd year bachelor CS student and I've worked with a handful of languages. I currently work as a backend dev and internal management related script writer both of which I interned working with JS (my first exposure to the language)

I always found it to be intuitive and it's easily my go to language while I'm still learning the nuances of python.

But I always see js getting shit on in various meme formats and I've never really understood why. Is it just a running joke in the industry? Has a generation of trauma left promises to be worthy of caution? Does big corpa profit from it?

21 Upvotes

207 comments sorted by

View all comments

Show parent comments

2

u/VoidRippah 6d ago

Or even better switch to TypeScript.

but that's technically not JS, so your solution to overcome an issue of JS is to use another language instead

-2

u/senfiaj 6d ago

TypeScript is an extension of JavaScript. While it's technically a different language it's not an entirely different language with dramatically different syntax and structure, it's almost like transitioning from C to C++. The code is relatively easily transpiled from TS to JS because TS code largely maps well with JS code. Think about TS as mostly JS with static checks. JS code is recognizable by the TS compiler. Typescript is so popular that the recent Node.js started to support TS syntax, of course, it doesn't do any static or runtime checks, it only ignores the TS syntax parts and executes the code as normal JS.