<function>
is provided, the values of the array elements are converted by this function before summing.
Syntax
Parameter | Description | Supported input types |
---|---|---|
<function> | The function used to convert the array members. | Any function that can convert an array |
<array> | The array used for the sum calculations. | Any array of numeric values |
Return Type
ARRAY
of the same type as the input array (must be numeric)
Example
The following example adds1
to each level in the levels
array:
2,5,9,19