Serenity Operating System
at hosted 11 lines 248 B view raw
1function foo(a, b) { return a + b; } 2 3try { 4 assert(isNaN(foo()) === true); 5 assert(isNaN(foo(1)) === true); 6 assert(foo(2, 3) === 5); 7 assert(foo(2, 3, 4) === 5); 8 console.log("PASS"); 9} catch (e) { 10 console.log("FAIL: " + e); 11}