How would you implement an infinite iterator (e.g., an infinite counter)? How do you safely consume it? | Iterator and Generator | javascript Interview Questions | NextRound.in