Zips multiple arrays together, creating tuples of elements at corresponding indices. Stops iterating when the shortest input array is exhausted.
An array of input arrays with potentially different element types
Multiple input arrays to be zipped together
A generator yielding tuples containing one element from each input array
const nums = [1, 2, 3];const strs = ['a', 'b', 'c'];[...zip(nums, strs)] // [[1, 'a'], [2, 'b'], [3, 'c']] Copy
const nums = [1, 2, 3];const strs = ['a', 'b', 'c'];[...zip(nums, strs)] // [[1, 'a'], [2, 'b'], [3, 'c']]
Zips multiple arrays together, creating tuples of elements at corresponding indices. Stops iterating when the shortest input array is exhausted.