Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
JavaScript
/
Iterators and generators
Which implementation gives a collection independent repeatable traversals?
from Iterators and generators
Node 24
beginner
1 min
Which implementation gives a collection independent repeatable traversals?
Create and return a fresh iterator on every Symbol.iterator call.
Store one iterator on the instance and return it every time.
Return the collection itself even though it has no next method.
Clone each iterator result after next returns it.
Check
Ask AI about this kata
Report an error
previous kata
What happens when break leaves a for...of loop before its generator finishes?
Quiz
next kata
What does this program print?
Predict the output
A new version is available
Reload