Obviously an inner function can access the outer scope's variables, e.g.
function example() {
console.log('My name is ' + name);
}
var name = 'Dave';
example();
Is it possible to access that variable with bracket notation? e.g.
function example() {
console.log('My name is ' + outerScope['name']);
}
(For those of you wondering why I want to do this, it's for a potential debugging technique, not actual production code).