JavaScript needs more helper functions for iteration (map, filter, etc.) – where should we put them?

62 · Axel Rauschmayer · Aug. 9, 2021, 9:02 a.m.
Iteration is a standard that connects operations with data containers: Each operation that follows this standard, can be applied to each data container that implements this standard. In this blog post: We first explore three questions: How does JavaScript’s iteration work? What are its quirks? What do helper functions for iteration look like? Examples include iteration versions of the Array methods .map(), .filter(), and .forEach(). Next, we examine the pros and cons of several approaches fo...