Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Current »

Content Freeze

As of July 25th, 2023, there is a content freeze on this page.

The sum() method will calculate the numeric sum of array values. Array values that are not numeric are treated as if they were zeros.

Return Value

Sum as a numeric value.

Example
pjs.define("Num", { type: 'integer', length: 10, dim: 5 });
 
Num[1] = 1;
Num[2] = 2;
Num[3] = 3;
Num[4] = 4;
Num[5] = 5;
 
return Num.sum();
//15
  • No labels