Skip to content

vikramcse/a-average

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Returns average of numbers in an array

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published