---
name: "up.util.toArray"
area: "API"
kind: "JavaScript function"
parent: "up.util module"
url: "https://unpoly.com/api/up.util.toArray"
---
<nav aria-label="Unpoly docs">[All docs](https://unpoly.com/index.md) · [up.util module](https://unpoly.com/api/up.util.md)</nav>

# up.util.toArray(value)

Converts the given [array-like value](https://unpoly.com/api/List.md) into an array.

If the given value is already an array, it is returned unchanged.

---

## Parameters {#parameters}

### value {#value}

(required)

Type: any

---

## Return value {#return-value}

Type: [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)

