michael@0: // The completion value of a for-of loop is the completion value of the michael@0: // last evaluation of the body, or undefined. michael@0: michael@0: assertEq(eval("for (let x of [1, 2, 3]) { x }"), 3); michael@0: assertEq(eval("for (let x of [1, 2, 3]) { x * 2 }"), 6); michael@0: assertEq(eval("for (let x of []) { x }"), undefined);