Options
All
  • Public
  • Public/Protected
  • All
Menu

Module last

Index

Functions Array

Array Functions

  • last<T>(array: ArrayLike<T>): T
  • Gets the last element of array.

    since

    5.6.0

    example
    last([1, 2, 3])
    // => 3

    Type Parameters

    • T

    Parameters

    • array: ArrayLike<T>

      The array to query.

    Returns T

    Returns the last element of array.