Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "elementAtOrElse"

Index

Functions

Functions

elementAtOrElse

  • elementAtOrElse<T>(this: Sequence<T>, index: number, defaultValue: function): T
  • Returns the element at position index (zero-based). If index is out of bounds returns the result of the given defaultValue function.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • index: number
    • defaultValue: function
        • (index: number): T
        • Parameters

          • index: number

          Returns T

    Returns T