@yookue/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'