max
Last updated
Last updated
Returns the largest value of the numbers in the passed array.
Name | Description | Input Type | Default | Options | Required |
---|---|---|---|---|---|
value | The array of values to return the largest value from. | Array/List | - | - | Yes |
Description | Output Type |
---|---|
Returns the largest value in the array. | Number |
In this example, we will get the biggest of the numbers in a list and print the result in the console.
Drag a button
component to the canvas and open the Action
tab. Select the press
event of the button and drag the Log.write
function to the event flow.
Call the function List.max
inside the Log.write
function.
Then call the function Conversion.toList
inside the List.max
function.
Enter the values of the list to find the max from.
The console will print the max value of the list.
In this example, the value printed will be 5
.
See also:
Functions