coope/lst/new-global.js

13 lines
138 B
JavaScript

function Foo()
{
this.Boolean = true;
}
// ok
var inst = new Foo();
inst.Boolean; // true
// bad
Foo();
new Boolean(); // TypeError