1 min readFeb 24, 2020
The purpose of the map {} is to transform your array based on some logic. forEach { } is a more generic iteration closure which does not give you an output.
The purpose of the map {} is to transform your array based on some logic. forEach { } is a more generic iteration closure which does not give you an output.