First page Back Continue Last page Overview Graphics

Scoping accident 2: Throwing a function

function foo() { this.x = 11; }

var x = ‘bar’;

try { throw foo; } catch (e) {

e();

x

}

ES3: Another editorial error deployed.

ES5: Normal static scoping again.