• Creates a slice of array with n elements taken from the beginning.

    Type Parameters

    • T

    Parameters

    • array: undefined | null | List<T>

      The array to query.

    • Optionaln: number

      The number of elements to take.

    Returns T[]

    Returns the slice of array.