Options
All
  • Public
  • Public/Protected
  • All
Menu

Module sum

Index

References

Functions Math

References

Renames and re-exports __type

Math Functions

  • sum(array: ArrayLike<number>): number
  • Computes the sum of the values in array.

    since

    5.6.0

    example
    sum([4, 2, 8, 6])
    // => 20

    Parameters

    • array: ArrayLike<number>

      The array to iterate over.

    Returns number

    Returns the sum.