max function

Syntax

  • float max(a, b)
  • string max(a, b)
  • float[] max(a, b)
  • string[] max(a, b)

Parameters

  1. a—(float, string, float[], string[])
  2. b—(same type as a)

Returns

Returns maximum of a and b.

Related

Examples

max(10, -10)
# result = 10
max("abc", "def")
# result = "def"

In this topic