Introduce a Test262-inspired conformance test suite with parallel runner, TOML manifest, and policy enforcement (pass/known_fail/skip). Covers language core (variables, expressions, functions, control flow, types), DOM bindings, events, Promises, scheduling, and 20 known-fail cases documenting unsupported features (for/while loops, try/catch, arrays, objects, arrow functions, etc.). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
8 lines
128 B
JavaScript
8 lines
128 B
JavaScript
function factorial(n) {
|
|
if (n <= 1) {
|
|
return 1;
|
|
}
|
|
return n * factorial(n - 1);
|
|
}
|
|
console.log(factorial(5));
|