Say I have the following function
function foo(){
console.log(test);
console.log(window);
}
Is there a way to prevent foo to access the window object ? I've tried the following
foo.apply({});
But it only changes the this and leaves access to window