It has awful parts that should be avoided. Once you learn to avoid them you can have a great time. This isn't that different from most other languages. I think javascript has just been more heavily complained about. There is also an automatic look-down-your-nose tendency that most of us started with, including myself. Once I decided to learn more than the bare minimum I became very happy with it.
It"s the very strange mix of very bad ideas and very good ideas that's baffling. Some other languages are homogeneously bad (php) but provides less suprises than js, because of their regularity. js is bipolar/schizophreniac.
JS is special because it has to be backwards-compatible.
It basically contains its entire history, from a PHP-like hack job that started it to the very elegant ES6/7. It's probably one of the few languages that expose their whole fossil record.
Yes. We tend to forget javascript was the first mainstream language (no, CommonLisp is not mainstream) proposing lambdas & closures, for instance. In the 1990's, that was quite amazing. And, on the other hand, they couldn't implement the 'this' keyword correctly, among other trivial mistakes.
>> It has awful parts that should be avoided. Once you learn to avoid them you can have a great time. <<
Oh, I imagine my copy of Crockford's "The Good Parts" is more well thumbed than most, and I do my utmost best to keep it all clean, but having a great time I am not.
> This isn't that different from most other languages.
Based on what people tend to complain about, some languages have more should-be-avoided parts than others. I guess no language is perfect... but that is so obvious that it doesn't need to be mentioned. Yeah, no language is perfect. But it's still interesting to see which ones are the least "perfect".
I don't get this tendency to want to muddy the waters with appeals to "nothing is perfect". Nothing is perfect, but some things sure seem to suck 5 times or more than other things.
(For that matter - it actually does seem like there are languages where you at least don't have to actively avoid parts of the language. Maybe they're not the best or currently the ones which are recommended, but it's not like people say that you should avoid them because they might trip you up in a weird way.)
But what features does JS have that no other language has, other than the ubiquity of the browser as a platform? JS has been mostly frozen ever since it was created in the mid 90s and you also don't have much to work with when it comes to the standard library.