Earlier quoted context omitted.
Being limited but safe may be the reason that JavaScript has won out over Java. As I recall, applets turned out to be a security nightmare.
Nah, Java applets lost because of the deployment nightmare they had become after MS was blocked in their attempt to coopt the language (they were barred from shipping incompatible JVMs, so they stopped shipping JVMs and Java IDEs altogether). ActiveX was winning, but that really was a security nightmare. Eventually enough of the useful parts of ActiveX crept into JS enough to build real stuff with it.
I didn't care at the time. I hated all things HTML, CSS, JS. Such a downgrade from state of the art. I regarded the browser as terrible means to deliver, bootstrap applets. Just like Flash.
One thing I didn't appreciate at the time was the genius of HTTP and URLs.
I'm still completely baffled by the "worse is better" thesis. I just can't understand why JavaScript was created, much less why it succeeded.
One can understand how mistakes like \0 terminated strings and SQL's NULL happen, become hard to undo. But JavaScript is the original sin that just keeps poisoning. Other platforms, ecosystems learn and grow and mature. JavaScript stubbornly refuses to acknowledge truth and goodness, and is all the more successful for it's belligerence.
Amazing.