max
Description
Returns the largest 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 largest value from. | Array/List | - | - | Yes |
Output
Description | Output Type |
---|---|
Returns the largest value in the array. | Number |
Example
In this example, we will get the biggest 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.max
inside theLog.write
function.Then call the function
Conversion.toList
inside theList.max
function.Enter the values of the list to find the max from.
Result
The console will print the max value of the list.
In this example, the value printed will be
5
.
Links
Related Information
See also:
Functions
Last updated