.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
[arrays]
(…Array): The arrays to process.[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]
当前内容版权归 lodash.com 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 lodash.com .