1 min readJan 21, 2020
It depends on the use case. If you don’t need to return a new array, use forEach and whenever you need to return a new array or mutate the currently existing one, use map
, filter
, reduce
.
It depends on the use case. If you don’t need to return a new array, use forEach and whenever you need to return a new array or mutate the currently existing one, use map
, filter
, reduce
.
latest posts here -> https://www.trevorlasn.com/