Iterator Design Pattern

The Iterator Design Pattern in JavaScript

In the field of programming, there exists a concept called ‘design patterns’. Design patterns are established solutions to recurring challenges in the field of software design. A sample challenge that requires the use of a pattern is the case of an API endpoint that returns a list of items. It may be fine for the endpoint to always return all the items that the database has for every API call to the endpoint, but it gets to a point where the list of items to return would be unnecessarily large or some of the items in the list returned may not be needed by the client making a request to the API....

February 3, 2023 · 7 min · Orim Dominic Adah