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

    Function get

    • Returns the indexed element of the given array

      Type Parameters

      • E

      Parameters

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

        The array to inspect

      • Optionalindex: number

        The index in the array

      • OptionaldefaultValue: null | E

        The default value if the array is empty

      Returns undefined | null | E

      the indexed element of the given array

      David Hsing

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