10 lines
152 B
JavaScript
10 lines
152 B
JavaScript
|
export function iterateForEach(it, fn) {
|
||
|
for (
|
||
|
let item = it.next();
|
||
|
item.done !== true;
|
||
|
item = it.next()
|
||
|
) {
|
||
|
fn(item.value);
|
||
|
}
|
||
|
}
|