Source code

Revision control

Copy as Markdown

Other Tools

function* foo(str) {
var x = eval(str); yield x[0];
}
for (var i = 0; i < 5; i++)
assertEq(foo("[4,5,6]").next().value, 4);
for (var i = 0; i < 5; i++)
assertEq(foo("arguments").next().value, "arguments");