I'm not sure that I agree with the "general consensus" thing; I've found plenty of people who seem to love JS and many who hate other languages. Frankly, I think most languages with any age are hated by many. We all know PHP gets a lot of crap, C gets bashed for being old and "unintuitive", C++ gets bashed for being a big mess, C# gets bashed for being too "Microsofty"/corporate, JavaScript gets bashed as you said.. The list goes on...
The key thing is to pick a language that meets these three requirements for you and you only:
Don't worry about why people hate xyz language... It's not worth it.
I personally don't like JS that much for these reasons:
None of these things are really "JavaScript's fault" as a language. I just don't have enough personal drive to deal with the complexities of the "ecosystem."
Really, it's a personal choice. Again, find what you like and learn it. What I will say though is don't be one of those people who just only ever uses JS and sticks to it like it's some gospel. Try other types of programming out, be open-minded. Then you will find out how much you really like JS in the grand scheme of things.
Addendum: I want to bring up one more thing that I think may irritate some people about the "JS World" right now. There seems to be this strange notion that "everything can and should be programmed in JS!" "JS can do all omg!"
I think many software engineers frown on the JS community for this and I equally think it's silly. Lack of desire to learn other programming languages, corporate laziness, and etc is not something to brag about. Also, software engineering and computer science encompass something deeper than the language; it's the concepts that make an engineer an engineer and so when people marry their tools, I find that to be disappointing. For example, using JavaScript to write native desktop applications IMO is utterly insane.
We have languages out which have been traditionally used and offer far more control over that type of environment for the past 40-60 years now. There's absolutely no reason to force framework on top of framework on top of runtime on top of runtime to be able to write native applications in JavaScript just because you don't want to learn another language or port something over. Application performance and overall quality suffers from this mentality. Does this mean I hate React Native or Electron and think they are completely useless? No. But if you're going to be developing anything significant, there are better options which will produce better quality applications. Anyone who wants to argue this, go compare the performances and system resource usages of Notepad++ or Vim and Atom. It's like watching Michael Jordan play basketball with a dog. I've had people in the JS community argue with me about how stuff like React Native and Electron is as good for native development as C or C++ and it's just plain wrong. I hate to break it, but I think some of these "cultural" or political things affect peoples views of the actual language at times.
Now let's talk about good JS stuff. Hashnode is an example of an awesome site written with JS. In fact, I spend a ton of time in my browser and I have the utmost respect and appreciation for JS work, trust me. One of my favorite web projects is godbolt... Check it out. It's a web gcc C/C++/Rust more compiler which compiles your code instantly with whatever compiler options you want and shows you line-for-line the assembly language generated by the compiler... All in the browser... Pretty awesome JS app!
Ivan Bernatović
Full stack web developer