• Returns the smallest value in an array of numbers

    Parameters

    • data: number[]

      Array of numbers to find minimum from

    Returns number

    The minimum value in the array

    If array is empty

    const numbers = [10.5, 2.3, 15.7];
    const minimum = min(numbers); // Returns 2.3
    • Uses Math.min() with spread operator for efficient calculation
    • Validates array is non-empty before processing