January 2020
Intermediate to advanced
470 pages
11h 13m
English
Processing lists of elements and applying some kind of operation to each of them is a quite common pattern in computer programming. Writing loops that systematically go through all the elements of an array or collection, starting at the first and looping until finishing with the last, and performing some kind of process on each of them is a basic coding exercise, usually learned in the first days of all programming courses. We already saw one such kind of operation in the previous section with reduce() and reduceRight(); let's now turn to a new one, called map().
In mathematics, a map is a transformation of elements from a domain into elements of a codomain. For example, you might transform numbers into strings ...
Read now
Unlock full access