The loop is the typical way of processing collections, but with the greater adoption of first-class functions in Javascript the collection pipeline is an appealing alternative. In this article we look at refactoring loops to collection pipelines with a small example.

This article is Part-1 of a series which deal with refactoring loops into collection pipelines in Javascript.