API Reference

Returns the mode of a set of numbers.

function mode(...numbers: (number | number[])[]): number | number\[]

// Example:

mode(1, 2, 3, 4, 5) //=> null

mode([1, 2, 2, 3, 4, 5]) //=> 2

mode(1, 2, 2, 3, 4, 4, 5) //=> [2, 4]