Skip to content

at

Array.at(array, offset)

Returns the value at the specified offset.

Example

ts
import { Array } from "@monstermann/array";

Array.at([1, 2, 3], -1); // 3
ts
import { Array } from "@monstermann/array";

pipe([1, 2, 3], Array.at(-1)); // 3