Update zipWith.md

This commit is contained in:
Rohit Tanwar
2018-01-21 12:21:22 +05:30
committed by GitHub
parent b8b56d24f2
commit c98c5a5bcc

View File

@ -19,4 +19,5 @@ const zipWith = (...arrays) => {
``` js
zipWith([1, 2], [10, 20], [100, 200], (a,b,c) => a + b + c); // [111,222]
zipWith([1, 2, 3], [10, 20], [100, 200], (a,b,c) => (a != null ? a : 'a') + (b != null ? b:'b') + (c != null ? c : 'c')); // [111, 222, '3bc]
```