[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [Array](https://evolu.dev/docs/api-reference/common/Array) › zipArray

## Call Signature

```ts
function zipArray<T>(
  arrays: T,
): readonly [Readonly<ZipArrayResult<T>>, Readonly<ZipArrayResult<T>>];
```

Defined in: [packages/common/src/Array.ts:707](https://github.com/evoluhq/evolu/blob/e7144e2bbe9069362b62dec1b64a8aa922b8f1b0/packages/common/src/Array.ts#L707)

Combines multiple arrays into an array of tuples.

Uses "shortest" mode — stops at the shortest input array. Preserves non-empty
type when all input arrays are non-empty. See the
[TC39 Array.zip proposal](https://github.com/tc39/proposal-array-zip)
for the pattern this follows.

### Example

```ts
zipArray([
  [1, 2, 3],
  ["a", "b", "c"],
]);
// [[1, "a"], [2, "b"], [3, "c"]]

zipArray([
  [1, 2],
  ["a", "b", "c"],
  [true, false],
]);
// [[1, "a", true], [2, "b", false]]
```

## Call Signature

```ts
function zipArray<T>(arrays: T): readonly Readonly<ZipArrayResult<T>>[];
```

Defined in: [packages/common/src/Array.ts:711](https://github.com/evoluhq/evolu/blob/e7144e2bbe9069362b62dec1b64a8aa922b8f1b0/packages/common/src/Array.ts#L711)

Possibly empty arrays.