• Creates an array of elements, grouped based on the position in the original arrays

    Example

    zip(['a', 'b'], [1, 2], [true, false]); // [['a', 1, true], ['b', 2, false]]
    

    Example

    zip(['a'], [1, 2], [true, false]); // [['a', 1, true], [undefined, 2, false]]
    

    Type Parameters

    • T

    Parameters

    • arr: T[]
    • Rest ...arrays: any[][]

    Returns unknown[][]

Generated using TypeDoc