Ask your AI Ask your AI to turn this code into a guided bug-finding exercise.
Claude ChatGPT I am reading "Which implementation gives a collection independent repeatable traversals?" on CodeWiki (https://codewiki.com/practice/mcq/javascript/iterators-generators/iterable-versus-iterator/).
Context (verbatim from the page):
"""
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.
"""
Introduce three subtle bugs into the example above and let me find them. Reveal each answer only after I have guessed.
Answer in English. Keep code examples in JavaScript. Where you are unsure, say so.