Chalkboard - v3.0.4
    Preparing search index...

    Function cummax

    • Calculates the cumulative maximum of an array.

      Parameters

      • arr: number[]

        The array

      Returns number[]

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