Something went wrong. Try again.
javascript for 🐜's, a tiny runtime with big ambitions antjs.org
Something went wrong. Try again.
123456789101112131415161718const assert = (condition, message) => { if (!condition) throw new Error(message);};
(function () { "use strict";
const sloppy = Function("return this"); assert(sloppy() === globalThis, "Function constructor must not inherit caller strictness");
const strict = Function('"use strict"; return this'); assert(strict() === undefined, "Function constructor must honor its own use strict directive");})();
console.log("Function constructor strictness tests passed");