last<T>
Gets the array’s last element.
Import:
import 'obsidian-test-mocks/setup';Signature:
function last(this: T[]): T | undefinedParameters:
| Parameter | Type | Description |
|---|---|---|
this |
T[] |
Returns: T | undefined — The last element, or undefined when the array is empty.