Initial commit of the lib/js/ tree and plans/ directory. A previous session left template-string work in progress — 278/280 unit tests pass (2 failing: tpl part-count off-by-one, escaped-backtick ident lookup). test262-runner.py and scoreboard are placeholders (0/8 with 7 timeouts); fixing the runner is the next queue item.
7 lines
172 B
JavaScript
7 lines
172 B
JavaScript
function divide(a, b) {
|
|
if (b === 0) throw new Error("div by zero");
|
|
return a / b;
|
|
}
|
|
var result;
|
|
try { result = divide(10, 0); } catch(e) { result = e.message; }
|
|
result |