ctx-script2.js 669 B

123456789101112131415161718192021222324
  1. console.log('\nIN script2.js');
  2. console.log('this: \t\t', this);
  3. console.log('window: \t', window);
  4. this.g && console.log('g(): \t\t', g());
  5. test(a === 101, 'a === 101');
  6. test(window.a === 101, 'window.a === 101');
  7. test(this.a === 101, 'this.a === 101');
  8. test(b === 102, 'b === 102');
  9. test(window.b === 102, 'window.b === 102');
  10. test(this.b === 102, 'this.b === 102');
  11. test(c === 103, 'c === 103');
  12. test(window.c === 103, 'window.c === 103');
  13. test(this.c === 103, 'this.c === 103');
  14. test('c' in this, '"c" in this');
  15. test(d === 104, 'd === 104');
  16. test(window.d === 104, 'window.d === 104');
  17. test(this.d === 104, 'this.d === 104');
  18. test({}.e === 1, '{}.e === 1');