Chalkboard - v3.0.4
    Preparing search index...

    Function mode

    • Returns the mode (the most recurring value) of an array.

      Parameters

      • arr: number[]

        The array

      Returns number

      const result = Chalkboard.stat.mode([1, 2, 2, 3, 3, 3]); // Returns 3