Description
The min
function returns the smallest value of the provided numbers. It can be called with any number of numbers and returns the minimum of those numbers.
Syntax
min(Number1, Number2[, Number3...])
Arguments
Argument | Description |
---|---|
Number1, Number2[, Number3...] |
A list of numbers from which the smallest value is to be determined. At least two values must be provided. |
Return Types
The function returns the smallest value as a number (number
).
Examples
Description | Example | Result |
---|---|---|
Simple Minimum |
min(5, 3, 9) |
3 |
Negative Value |
min(-5, 3, 0) |
-5 |
Decimal Values |
min(1.2, 3.5, 0.8) |
0.8 |
Notes
- Any number of numbers can be provided, but the function only works with numeric values.
- If no arguments are provided, an error occurs. At least two numbers must be specified.
- Processing mixed types like numbers and strings results in an error.
Comments
0 comments
Please sign in to leave a comment.