this Keyword in Different Contexts
How does 'this' binding differ between outer and inner?
function outer() {
console.log('outer this:', this);
function inner() {
console.log('inner this:', this);
}
inner();
}
outer();
function outer() {
console.log('outer this:', this);
function inner() {
console.log('inner this:', this);
}
inner();
}
outer();