Returns the largest value in a sequence of numbers.
The version of max()
with one parameter interprets it as an array of numbers and returns the largest number.
The version of max()
with two or more parameters interprets them as individual numbers and returns the largest number.
Examples
Syntax
max(n0, n1)
max(nums)
Parameters
n0
Number:
first number to compare.
n1
Number:
second number to compare.
nums
Number[]:
numbers to compare.
Notice any errors or typos? Please let us know. Please feel free to edit src/math/calculation.js and open a pull request!