Difference between revisions of "Sum"

From MiniScript Wiki
Jump to navigation Jump to search
(Created page with "<c>sum</c> returns the total of all elements in a list, or all values in a map. === Arguments === {| class="wikitable" |- ! Parameter Name !! Default Value !! Meaning |- | '...")
 
(No difference)

Latest revision as of 16:26, 17 March 2020

sum returns the total of all elements in a list, or all values in a map.

Arguments

Parameter Name Default Value Meaning
self list or map object to sum

Example

range(3).sum	// returns 6 (3 + 2 + 1 + 0)