• Calculates the sum of a list of numbers.

    Returns

    The sum of all the numbers in the array.

    Throws

    An error if the numbers parameter is not an array, or if it does not contain at least two numbers.

    Parameters

    • Rest ...numbers: [a: number, b: number, ...more: number[]]

      An array of numbers to sum up. Must contain at least two numbers.

    Returns number

Generated using TypeDoc