ladybird/Libraries/LibJS/Tests/functions/function-this-in-arguments.js
2020-07-03 19:30:13 +02:00

17 lines
288 B
JavaScript

load("test-common.js");
try {
assert(typeof this === "object");
assert(this === globalThis);
function Foo() {
this.x = 5;
assert(typeof this === "object");
assert(this.x === 5);
}
new Foo();
console.log("PASS");
} catch (err) {
console.log("FAIL: " + err);
}