Also, languages are always a function of their ecosystems. You could argue, remove Apple products and Swift/ObjC would vanish.
Easy to reason about, great performance for most cases, simple to debug and write code for, a plethora of libraries, easy to ship, no need to have different teams for backend/frontend, and minimal tooling needed.
GP comment was presented somewhat snarkily, but I'm not sure they're all that wrong.
You don't think JS is obviously unique for its ubiquitous Promise, async/await, + async-everything abstraction. You tend to only get that in other languages (Rust, Python, Ruby) by limiting yourself to a fraction of the ecosystem.
Btw, what's lazy is making convenient uncharitable assumptions about others than just... asking.
This forum is full of people who could tell you why they still use JS after they analyze pros/cons of other languages.
But I have yet to find a language that has the same set of features except JS. If you want to offer up an alternative, please do so.
I'd like to know what language you use as a baseline for this?
I made my first "real" Javascript code back in 2005 (a vector map system that worked in realtime) and I've been working mostly with frontend for the last 3 years so it is not lack of familiarity. In between that however I have programmed a lot of other languages, worked in a number of different teams, written new code, maintained old code and generally gotten some perspective on life.
That perspective has sent Javascript down my list of languages that are easy to reason about.
The lack of OO means no typecasting, inheritance models, interfaces, etc.
Arrays are fully dynamic, not type restricted and operate strictly by reference.
No memory mapping, manual garbage collection or even GC adjustments.
Suddenly the list of things someone has to understand to be a competent JS engineer is way smaller than a language like C or Java.
There are other languages that have a similar level of being easy to understand such as Python and Ruby, and they're good languages too but have a different set of tradeoffs.
If they started using PHP, without monopoly, they would not have switched to JS.
But plenty of people have switched from PHP to python or ruby.
> Also, languages are always a function of their ecosystems. You could argue, remove Apple products and Swift/ObjC would vanish.
Python, C and Java are not.