githubEdit

ArraySum

Returns the sum of all values in an array

Method Signature

ArraySum(array=[array])

Arguments

Argument
Type
Required
Description
Default

array

array

true

Examples

Sum of values in an array

Uses the arraySum function to get sum of values in an array

Run Examplearrow-up-right

numberArray = [ 
	10,
	99,
	27,
	72
];
writeOutput( arraySum( numberArray ) );

Result: 208

Sum of values in an array

To get sum of values in an empty array

Run Examplearrow-up-right

Result: 0

Sum of values in an array

Uses the sum member function is the same as running arraySum.

Run Examplearrow-up-right

Result: 208

Additional Examples

Run Examplearrow-up-right

Last updated

Was this helpful?