unzip
Creates an array of arrays, ungrouping the elements in an array produced by zip.
- Use
Math.max(),Function.prototype.apply()to get the longest subarray in the array,Array.prototype.map()to make each element an array. - Use
Array.prototype.reduce()andArray.prototype.forEach()to map grouped values to individual arrays.