Date

“Array” Methods

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

source npm package

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).

引入版本

3.8.0

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

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

示例
_.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
  return a + b + c;
});
// => [111, 222]