JavaScript, the core language, is OK. Sure, there are warts, like this, lack of a good module system, and weird type coercions.
Most of the bad rap JavaScript gets is because it lives in the browser, and the DOM, with all the cross browser issues that come with that. It's not all JavaScript's fault. In fact, most of it is definitely not JavaScript's fault.
But this was fixed with strict mode; this is like criticising Java for not having generics, even though generics were added ages ago.
You can still assign/use global variables in the browser, but like the parent says, this is the browser's fault - having to accept old and badly-written code for compatibility reasons.
My biggest problem with JavaScript is that I never can seem to wrap my head around the multiple null/undefined type of values and how to correctly test for them, as well as type introspection. Or, more appropriately, my problem with JavaScript is that it makes that confusing, and I use it just infrequently enough that I forget what I learned last time regarding that. Of course, that's not entirely JavaScript's fault, it just doesn't make it very easy.
JavaScript, the core language, is OK. Sure, there are warts, like this, lack of a good module system, and weird type coercions.
Most of the bad rap JavaScript gets is because it lives in the browser, and the DOM, with all the cross browser issues that come with that. It's not all JavaScript's fault. In fact, most of it is definitely not JavaScript's fault.