Function zip

  • Returns an array of arrays, where the ith array contains the ith element from each of the argument arrays. The returned array is truncated in length to the shortest array in arrays. If arrays contains only a single array, the returned array contains one-element arrays. With no arguments, the returned array is empty.

    Type Parameters

    • T

    Parameters

    • Rest ...arrays: ArrayLike<T>[]

    Returns T[][]