> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openbridge.shop/llms.txt
> Use this file to discover all available pages before exploring further.

# .reverse()

> Reverse the sort order

```javascript theme={null}
openbridge.articles.list().reverse(value?)
```

Reverses the default sort order of articles. By default, articles are sorted by published date (newest first). Use this to get oldest first.

## Parameters

| Param   | Type      | Required | Description                        |
| ------- | --------- | -------- | ---------------------------------- |
| `value` | `boolean` | No       | Whether to reverse (default: true) |

## Returns

`ArticleListBuilder` (chainable)

## Examples

### Get oldest articles first

```javascript theme={null}
const { items } = await openbridge.articles.list().reverse().limit(10)
```

### Combine with blog filter

```javascript theme={null}
const { items } = await openbridge.articles
    .list()
    .blog('news')
    .reverse()
    .limit(5)
```

### Conditional reverse

```javascript theme={null}
const sortOldestFirst = true

let query = openbridge.articles.list().limit(10)

if (sortOldestFirst) {
    query = query.reverse()
}

const { items } = await query
```
