Sure, there are bad examples, but it is still a terrible language. It has a horrific type system, encourages the use of globals, is the epitome of TMTOWTDI to the point where there's still no standardized module/object system which impedes collaboration and lacks language features like operator overloading that are present in most mainstream languages today.
I'm not saying you can't write good, elegant code in JS, I'm just saying that you have to fight the language to do it.
I'm not saying you can't write good, elegant code in JS, I'm just saying that you have to fight the language to do it.