> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.itential.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itential.com/_mcp/server.

# reverse

> Reference for the reverse workflow task, which reverses the order of elements in an array.

The `reverse` task reverses the order of the elements in an array. The first element becomes the last, and the last element becomes the first.

## Potential use case

Use this task when you have a dataset and want to view the records in the opposite order.

## Properties

| Incoming | Type  | Description                     |
| -------- | ----- | ------------------------------- |
| `arr`    | Array | Required. The array to reverse. |

| Outgoing        | Type  | Description         |
| --------------- | ----- | ------------------- |
| `reversedArray` | Array | The reversed array. |

## Example

The `arr` variable is set to `["1","2","3"]`.

![](/_fern-img/c7d88a2a5fb4f51ba575cd1b514cd681477c80e0b053dcb29e40a84194dc0130.webp)

The result is `["3","2","1"]`.

![](/_fern-img/c2d2bd576a513794299141370389502edeb13f2c238f3fb71153b0a5da825475.webp)