min
Description
Returns the smallest value of the numbers in the passed array.
Input / Parameter
Name | Description | Input Type | Default | Options | Required |
---|---|---|---|---|---|
value | The array of values to return the smallest value from. | Array/List | - | - | Yes |
Output
Description | Output Type |
---|---|
Returns the smallest value in the array. | Number |
Example
In this example, we will get the smallest of the numbers in a list and print the result in the console.
Step
Drag a
button
component to the canvas and open theAction
tab. Select thepress
event of the button and drag theLog.write
function to the event flow.Call the function
List.min
inside theLog.write
function.Then call the function
Conversion.toList
inside theList.min
function.Enter the values of the list to find the min from.
Result
The console will print the min value of the list.
In this example, the value printed will be
1
.
Links
Related Information
See also:
Functions
Last updated