Source code

Revision control

Copy as Markdown

Other Tools

load(libdir + "asserts.js");
function* f() {
yield yield 1;
}
var g = f();
assertEq(g.next().value, 1);
assertEq(g.return("hello").value, "hello");
assertEq(g.next().value, undefined);