Here's the thing, JavaScript as it is (specifically ES5, a little bit less so with ES6, but even then, still an issue) is too dynamic to reason about very well, especially when using large libraries that do crazy things. Yes, it can be changed to be easier to reason about, but the fundamental issue I see is that too many people are using the very dynamic features of JavaScript.