Files
test-repo/tests/format/js/function-sent/function-sent.js
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
276 B
JavaScript
Raw Normal View History

2026-09-14 20:48:16 +08:00
function *adder(total=0) {
let increment=1;
do {
switch (request = function.sent){
case undefined: break;
case "done": return total;
default: increment = Number(request);
}
yield total += increment;
} while (true)
}