I am confused about why you used (iterationCount < end) as in the MDN docs its (nextIndex < end) ; i am asking because if i use (iterationCount < end) in the iterator the result for the same input in the generator function is different .
Very bad explanation.. You haven't even thought us every yield will stop function execution. Beginner confused by your explanation l, don't make such videos without full information
Can't you do a better comment?! Learn to give proper humble feedback. You can comment like this: "For clarity, please mention that each `yield` in a generator function pauses execution. This would help beginners understand better. Thanks!"
learned a new concept thank you. btw is this the same iterator concept as we have in java? also altho the code is working but i think we should be giving nextStart in if condition of first program instead of iterationCount. cheers.
console.log("Iterated over sequence of size: ", result.value); // [5 numbers returned, that took interval in between: 0 to 10] this was the code in the end which shows how many times it runs..but how can result.value return how many time it ws executed can u pls explain?