I always find these takes so radically different from my own experiences. We do use Typescript and maybe that’s the difference, but these days you’re either using JSDoc or Typescript if you’re working with JavaScript so it feels sort of disingenuous to not simply expect it’s what people mean when they say JavaScript. I’m sorry if it is not.
We use it for most things because it works for most things. It’s one of the best working experiences I’ve ever had in two decades of programming. It did take some team work to setup templating and various CI related “rules” to make sure everyone is working in a similar fashion, but that wasn’t too much of a hurdle to overcome. It turns out most developers are happy to just fork a template project and follow whatever guidelines your organisation has set itself upon, and being as accessible as JavaScript is it also means that you can fine tune the development processes exactly how you need them. For us that’s a rather fascist linter, it’s complete control of how you use APIs and a range of other internally build libraries that handle things that you could probably find on NPM but shouldn’t.
The benefits is that everything works everywhere and that every developer can work together rather easily because everyone is using the same tools and writing code the same way. We use OData as an example, and because every OData client in Typescript is sort of terrible we build our own. Now it’s simply part of our API package and it allows developers to easily consume OData APIs without thinking about the inner workings because that’s done by the platforms team. I know you can do these things in every language, but in my experience it’s not something you do in C# or Java because the standard library is “good enough” and the standard “rules” for how you write those languages are in a similar boat where you probably won’t take too much control. Which is how you end up with very mixed code bases, or at least that’s what happened in every place that I worked. The freedom and the ease of which the JavaScript environment lets you take control is such a joy and a benefit that I really don’t get the hate it faces.
That being said. It’s a obviously a terrible language and I absolutely hope html and browsers will eventually get to a point where we can just write everything in (whatever language you like) + html. But it’s not like it’s a joy to write web frontends in any server side rendering that I know of. I’d much rather work with react than any other front end tech that I’ve ever worked with in the past. But I do simultaneously hope for better days.