It's a bit trite to say at this point, but I'd get rid of JS as the language that runs in the browser. In its place would probably be something like Lua, which is very similar but (in my experience) is much more pleasant and has nowhere near as many gotchas, as well as support for modules and other ES6 features without the need for a transpiler. It's also very easy to embed, which would mitigate the current browser oligopoly.