Javascript is a horrible language
The NULL pointer has been described as the billion dollar mistake. Javascript says "hold my beer" as it introduces undefined, multiple definitions of equality, weird ass rules for this, scope, hoisting etc. Then we have multiple frameworks that add fundamental functionality, and cosmetic languages like typescript / coffeescript that try to take the worst edges off writing code, but it's still an exercise in turd polishing.
The only reason we're talking about it is because every browser supports it. I suspect that as webassembly takes off and software can be developed in more appropriate, typesafe languages, that JS will revert somewhat to its original purpose - scripting glue.