Open this example in the interactive library
Source code
const iterator = [3, 6, 9, 12].values();
console.log(iterator.find((n) => n > 6));
Sample output
9

Open this example in the interactive library
const iterator = [3, 6, 9, 12].values();
console.log(iterator.find((n) => n > 6));
9