You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

23 lines
478 B

// indirect eval -> this is bound to the global object, E5 Section 10.4.2, step 1.a.
var g = (function () { var e = eval; return e('this'); } )();
/*===
true number NaN
true number Infinity
true undefined undefined
===*/
/* This test overlaps with test-bi-properties. */
function testValue(name) {
var v = g[name];
print(name in g, typeof v, v);
}
try {
testValue('NaN');
testValue('Infinity');
testValue('undefined');
} catch (e) {
print(e.name);
}