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
iterableto a new array with the giventransformfunction. The result of thetransformfunction will only be included in the returned array, if and only if the result was strictly not equal toundefinedornull.Thus, the returned array can never include
undefinedornull.Use this if you want to
mapandfiltersimultaneously; avoiding unnecessary loops.See
mapNotUndefined
Example