Options
All
  • Public
  • Public/Protected
  • All
Menu

Module array/last

Index

References

Functions

References

Renames and re-exports last

Functions

  • last<T>(list: ArrayLike<T>): T
  • last(list: string): string
  • Returns the last element of the given array.

    example
     last(['fi', 'fo', 'fum']); //=> 'fum'
    last([]); //=> undefined

    Type parameters

    • T

    Parameters

    • list: ArrayLike<T>

    Returns T

  • Returns the last element of the given array.

    example
     last(['fi', 'fo', 'fum']); //=> 'fum'
    last([]); //=> undefined

    Parameters

    • list: string

    Returns string

Generated using TypeDoc