• Returns the sum value of the given array

    Parameters

    • Optionalvalues: number[]

      the array to calculate

    Returns number | undefined

    the sum value of the given array

    sum([1, 2, 3]);    // 6