Options
All
  • Public
  • Public/Protected
  • All
Menu

Module array/head

Index

References

Functions

References

Renames and re-exports head

Functions

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

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

    Type parameters

    • T

    Parameters

    • list: ArrayLike<T>

    Returns T

  • Returns the first element of the given array.

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

    Parameters

    • list: string

    Returns string

Generated using TypeDoc