Get the last item of a sequence, or undefined if the sequence is empty.
undefined
import { pipe } from "yta";import { of, last } from "yta/sync";pipe(of("foo", "bar", "baz", "quux"), last());// => "quux" Copy
import { pipe } from "yta";import { of, last } from "yta/sync";pipe(of("foo", "bar", "baz", "quux"), last());// => "quux"
See also:
Get the last item of a sequence, or
undefinedif the sequence is empty.See also: