The main critique of programming of course is largely not so much the language (not that bad ones are any help, mind), but the environment in which it's placed. COBOL is bad, but it's particularly notorious because of its crusty, ancient, mainframe-centric development environment (if you can call that "development"). Dev, deployment, scaling whatever, those are the real problems -- from any language.
It should be no surprise we have all these containers and virtual servers and dependency trees today, because we've always had them, and they've always been bad, they're simply continuing to grow with technology and managing them manually is utterly intractable so we write algorithms to do it instead.
In my opinion, JS is a perfectly usable language, but understand that opinion is based on the limited scope I use it in. It does tend to be rather verbose; I have four examples of projects in the 1-3 kLOC range, some of which I could probably clean up if I had deeper knowledge of it. Everything else of mine is short calculators (a few kLOC in total, individuals typically being under 100 lines), or just sitting down for a session at the console. It sure is handy: it has powerful string and array functions at your fingertips, and is basically only ever an F12 away.
In contrast, I can't imagine how much of a pain a production web or backend service might be -- in JS or otherwise. Typical served JS is generated, minified and obfuscated, partly to optimize storage size and execution speed, partly for... less transparent reasons. There are transpilers between many languages, any of which might be used for actual development, over JS; and there are zillions of libraries (implemented in JS again, or integrated into the browser natively, or as webasm or various other trendy things), wherein you incur all the usual dependency-hell problems. Add to that, proprietary (private) libraries, various web APIs, etc., and you've got plenty of potential for a real mess.
Tim