Loading Post...
Loading Post...
Aggregate or Collection is the Class you want to iterate using for…of for…in etc.
Item is the object, many of which are is inside the Collection/Aggregate
example: A Collection is Students, where you want to iterate over every individual Item which is a Student
Iterable is a built-in interface in Typescript
You want to do something like:
Item Class:
Collection Iterator Class:
Collection (or an Aggregate) Class:
Item Class:
Collection (or an Aggregate) Class: