Let's suppose I have the following:
(function() {
let myVar = 300;
window.myFunc = function() {
console.log(myVar);
};
})();
Without changing the above code, can you think of a way to change the myVar variable? I mean from the outside, can you do something like:
window.myFunc.__closure__.myVar = 10;
Is this possible?
evil()somewhere where this variable is visible, and you can inject some code.