-
Notifications
You must be signed in to change notification settings - Fork 0
modes
Subhajit Sahu edited this page Aug 8, 2022
·
15 revisions
Find the values that appear most often.
function modes(...xs)
// xs: a list of numbers
const xmath = require('extra-math');
xmath.modes(1, 2);
// → [1, 2]
xmath.modes(1, 2, 2);
// → [2]
xmath.modes(1, 2, 2, 3, 3);
// → [2, 3]