If a function doesn't exist, roll your own.
Something like the following should work.
function getSum( ... nums ):Number
{
var total:Number = 0;
for each( var number:Number in nums )
{
total += number;
}
return total;
}
You may want to validate your inputs to have better error handling.
--- In [email protected], "AJC2357" <ajc2...@...> wrote:
>
> Is there really no way to sum a simple array w/o adding element by element?
>
> var myArray:Array = [1,2,3,4,5];
>
> I've found min and max functions, but nothing to sum...
>
> Any tips appreciated!
>