Get the last element of an array.
import last from "jsr:@cordor/array-last@1"; const array = [1, 2, 3]; console.log(last(array)); // 3 // Or const array = [4, 5, 6]; console.log(array.last); // 6
MIT
Made with 💗 by Juliette Cordor
Add Package
deno add jsr:@cordor/array-last
Import symbol
import * as array_last from "@cordor/array-last";
---- OR ----
Import directly with a jsr specifier
import * as array_last from "jsr:@cordor/array-last";
Add Package
npx jsr add @cordor/array-last
Import symbol
import * as array_last from "@cordor/array-last";
Add Package
yarn dlx jsr add @cordor/array-last
Import symbol
import * as array_last from "@cordor/array-last";
Add Package
pnpm dlx jsr add @cordor/array-last
Import symbol
import * as array_last from "@cordor/array-last";
Add Package
bunx jsr add @cordor/array-last
Import symbol
import * as array_last from "@cordor/array-last";