Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ayonli_jsext/array/index.ts>last

A JavaScript extension package for building strong and modern applications.
Latest
function last
import { last } from "https://deno.land/x/ayonli_jsext@v0.9.72/array/index.ts";

Returns the last element of the array, or undefined if the array is empty. This function is equivalent to arr[arr.length - 1] or arr.at(-1).

Returns

T | undefined