<script>
const iterable = {
[Symbol.iterator]() {
return {
next() {
return {
{ value, done}
}
}
}
}
let iterator = iterable[Symbol.iterator]();
const arr2 = [1, 2, 3]
let iter2 = arr2[Symbol.iterator]();
iter2.next();
for (const a of iter2) log(a);
</script>
<script>
let iterator = iterable[Symbol.iterator]();
iterator.next();
iterator.next();
</script>