a-average

1.0.0 • Public • Published

a-average

Returns average of numbers in an array

Install

$ npm install --save a-avarage

Examples

var avg = require('a-avarage');
 
console.log(avg([1, 2, 3, 4, 5]));
// -> 3
 
console.log(avg([1, 2, 3, 4]));
// -> 2.5
 

Usage

require('a-avarage')( array )

Arguments:

  • array: array of Numbers

Returns: Returns average of numbers in an array

License

© 2016 vikram. MIT License

Keywords

Install

DownloadsWeekly Downloads

3

Version

1.0.0

License

ISC

Last publish

Collaborators

  • vikramcse