Maps the given iterable to a new array with the given transform function.
The result of the transform function will only be included in the returned array,
if and only if the result was strictly not equal to undefined or null.
Thus, the returned array can never include undefined or null.
Use this if you want to map and filter simultaneously; avoiding unnecessary loops.
Maps the given
iterable
to a new array with the giventransform
function. The result of thetransform
function will only be included in the returned array, if and only if the result was strictly not equal toundefined
ornull
.Thus, the returned array can never include
undefined
ornull
.Use this if you want to
map
andfilter
simultaneously; avoiding unnecessary loops.See
mapNotUndefined
Example