Skip to content

Richienb/median-average

Repository files navigation

median-average Travis CI Build Status

Get the median of an array of numbers.

NPM Badge

Install

npm install median-average

Usage

const medianAverage = require("median-average");

medianAverage([1, 2, 6]);
//=> 2

medianAverage([1, 2, 6, 8]);
//=> 4

API

medianAverage(array)

array

Type: array<number>

The array to get the median of.