Function map

  • Maps an array of values to an array of results of the callback.

    Type Parameters

    • T
    • U

    Parameters

    • arr: T[]

      array to map

    • fn: ((value, index, array) => U)

      callback to map the array

        • (value, index, array): U
        • Parameters

          • value: T
          • index: number
          • array: T[]

          Returns U

    Returns U[]

    the mapped array

Generated using TypeDoc