One thing that confuses me is when I implement the interface array, there are methods that return an IterableIterator. I understand that the IterableIterator extends from Iterator, which makes sense to me.
interface IterableIterator<T> extends Iterator<T> {
[Symbol.iterator](): IterableIterator<T>;
}
However, I'm not sure what I should implement for Symbol.iterator. It seems like it also returns an IterableIterator (could this be recursion?) I am struggling with the concept of IterableIterator and would appreciate any insight or resources on this topic.