> ## Documentation Index
> Fetch the complete documentation index at: https://kk-83bff226.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# lastNElements

> Returns the last 'n' elements from the given array.

## Signature

```typescript path=null start=null theme={null}
lastNElements<T>(arr: T[], n: number): T[]
```

## Type Parameters

* **T**

## Parameters

* **arr**: `T[]` - The array from which to extract elements.
* **n**: `number` - The number of elements to extract from the end of the array.

## Returns

`T[]` - A new array containing the last 'n' elements from the input array.

## Source

Defined in [array.ts:112](https://github.com/koji/ichigyou/blob/main/src/array.ts#L112)
