g.js — graphical objects for JavaScript

averageaverage

Calculate the average of a list of numbers.

g.average([10, 15, 20, 25]);

See Also

  • min: Take the smallest value from a list.
  • max: Take the largest value from a list.
  • total: Calculate the sum of all values in the list.