Function arrSum

  • Calculates the sum of an array of numbers.

    Parameters

    • array: number[]

      The array of numbers to sum.

    Returns number

    The sum of all numbers in the array.

    Example

    const numbers = [1, 2, 3, 4, 5];
    arrSum(numbers);
    //=> 15

Generated using TypeDoc