<br />

Limit a collection to the specified number of elements, optionally sorting them by a specified property first.

<br />

Returns the limited collection.

| Usage | Returns |
|---|---|
| `ImageCollection.limit(max, *property*, *ascending*)` | Collection |

| Argument | Type | Details |
|---|---|---|
| this: `collection` | Collection | The Collection instance. |
| `max` | Number | The number to limit the collection to. |
| `property` | String, optional | The property to sort by, if sorting. |
| `ascending` | Boolean, optional | Whether to sort in ascending or descending order. The default is true (ascending). |