_.zipWith

_.zipWith([arrays], [iteratee=_.identity])

This method is like _.zip except that it accepts iteratee to specify how grouped values should be combined. The iteratee is invoked with the elements of each group: (...group).

Since

3.8.0

Arguments

  1. [arrays] (...Array): The arrays to process.
  2. [iteratee=_.identity] (Function): The function to combine grouped values.

Returns

(Array): Returns the new array of grouped elements.

Example

_.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
  return a + b + c;
});
// => [111, 222]
doc_Lodash
2016-11-27 16:42:06
Comments
Leave a Comment

Please login to continue.