Infinite iterators can be used with for...of
if we eventually break out of the loop through some means
#37096
Labels
Content:JS
JavaScript docs
MDN URL
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Iterator/take
What specific section or headline is this issue about?
Using take() with a for...of loop
What information was incorrect, unhelpful, or incomplete?
You absolutely can, provided that you eventually break out of the loop through some means such as
break
,return
,throw
, etc.What did you expect to see?
No incorrect statement.
Do you have any supporting links, references, or citations?
No response
Do you have anything more you want to share?
No response
MDN metadata
Page report details
en-us/web/javascript/reference/global_objects/iterator/take
The text was updated successfully, but these errors were encountered: