Calculate the average of an array of numbers.
npm install array-avg> Calculate the average of an array of numbers.
Install with npm
``sh`
$ npm i array-avg --save
`js
var avg = require('array-avg');
avg([1, 2, 3, 4, 5]);
//=> 3
avg(['1', '2', 3, '4', 5]);
//=> 3
avg([1, 'foo', 2, 4, {}, 5]);
//=> 2
`
array-sum: Add up all of the numbers in an array of numbers. Works when non-numbers are… more | homepage
Install dev dependencies:
`sh``
$ npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Brian Woodward
Copyright © 2015 Brian Woodward
Released under the MIT license.
*
_This file was generated by verb-cli on September 23, 2015._