Is it completely impossible to reach into a JavaScript closure?
<p>I am curious if it is indeed the case that well written Javascript IIFEs are impossible to bypass; For example:</p>

<pre><code>(function() {
    var foo = 9;

    var exports = {
        getFoo: function() {
            return foo;
        }
    };
    window.my_exports = exports;
})();

// can I do anything at all at this point to mutate/access foo directly?
</code></pre>

<p>Is there no clever ways to mutate foo anymore? Is it just a "memory leak" with a single strong reference from the closure getFoo which is exposed to global scope, so it cannot be reclaimed?</p>

<p>assuming no memory editors are used that is.</p>