Or, if you're thinking server-side JavaScript: would the web have been more secure running PHP and Python?
And it's not fully sandboxed. It betrays its user all the time by abusing unrestricted access to the network, or activating browser functionality that most of us would disable if we could.
I'm not saying it's THE bad decision, but it is the product of a generation of thinkers who were not thinking about threats the way we do now. If we were to go back in time and have the opportunity to do it differently, I think we would take that opportunity.
But we don't actually need a time machine. We can just accept some sunk costs and move forward anyhow.
And before that, whatever Microsoft "macro" or embedded code variant was popular that week in all those document formats...
We aren't going back to a page refresh every time you want to update something any time soon
But 99% of web applications are forms and displaying stuff. All JS accomplished is making it look prettier and enhanced tracking.
I mean, Facebook, my bank, Amazon… these can all be created with no client side code. It would be a lot of refreshes, but it can be done.
If you want a wildly interactive art experience, just load the appropriate browser for that.