Is there a way in Javascript to retrieve the scope of a function from within that function? This would be the same as the closure a subfunction would get. E.g.
var foo = "exists";
function myFunc(){
var bar = "also exists";
console.log(foo); // "exists"
console.log(scope.foo); // undefined
console.log(scope.bar); // "also exists"
}