From a2f959334bda6dc17f1a92e1c469d0eb8c9185b1 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Sun, 23 Jan 2022 13:19:25 +0200 Subject: [PATCH] Update unzipWith.md --- snippets/unzipWith.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snippets/unzipWith.md b/snippets/unzipWith.md index 677c5b8da..82b5de00e 100644 --- a/snippets/unzipWith.md +++ b/snippets/unzipWith.md @@ -2,12 +2,12 @@ title: unzipWith tags: array,advanced firstSeen: 2018-01-24T12:44:16+02:00 -lastUpdated: 2020-10-22T20:24:44+03:00 +lastUpdated: 2022-01-23T13:18:50+03:00 --- Creates an array of elements, ungrouping the elements in an array produced by [zip](/js/s/zip) and applying the provided function. -- Use `Math.max()`, `Function.prototype.apply()` to get the longest subarray in the array, `Array.prototype.map()` to make each element an array. +- Use `Math.max()` and the spread operator (`...`) to get the longest subarray in the array, `Array.prototype.map()` to make each element an array. - Use `Array.prototype.reduce()` and `Array.prototype.forEach()` to map grouped values to individual arrays. - Use `Array.prototype.map()` and the spread operator (`...`) to apply `fn` to each individual group of elements.