Skip to content

mode

mode(array) → number · Math

Find the most frequently occurring value in a numeric array.

  • array (required): array of numbers
utlx
{
  result: mode([1, 2, 2, 3, 3, 3])          // 3 (most frequent)
}

Released under AGPL-3.0.