blob: d824da211d3f0cdd790e2e62ab921fc4a25d632d (
plain)
1
2
3
4
5
6
7
8
9
|
// |reftest| skip-if(!this.hasOwnProperty('Iterator')) -- Iterator is not enabled unconditionally
const reducer = (acc, value) => acc + value;
const iterator = [1, 2, 3].values();
assertEq(iterator.reduce(reducer, 0), 6);
if (typeof reportCompare === 'function')
reportCompare(0, 0);
|