@unikue/ts-lang-utils
    Preparing search index...

    Function get

    • Returns the indexed element of the given array

      Type Parameters

      • E

      Parameters

      • Optionalarray: E[] | readonly E[] | null

        The array to inspect

      • Optionalindex: number

        The index in the array

      • OptionaldefaultValue: E | null

        The default value if the array is empty

      Returns E | null | undefined

      the indexed element of the given array

      David Hsing

      get(['foo', 'bar'], 0);    // 'foo'