1try {
2 assert(typeof this === "object");
3 assert(this === globalThis);
4
5 function Foo() {
6 this.x = 5;
7 assert(typeof this === "object");
8 assert(this.x === 5);
9 }
10
11 new Foo();
12 console.log("PASS");
13} catch (err) {
14 console.log("FAIL: " + err);
15}