1 The `max()` function returns the maximum of all given arguments. 2 3 If multiple equivalent maximum values are given (e.g. `null` and `false` 4 both are treated as `0` when comparing numerically), the first maximal 5 value is returned. 6 7 Returns the maximum value among all given arguments or `null` if no 8 arguments were passed. 9 10 -- Testcase -- 11 {% 12 printf("%.J\n", [ 13 max(), 14 max(5, 1, 3, -10), 15 max("foo", "bar", "xxx", "abc"), 16 max(false, null, 0, NaN) 17 ]); 18 %} 19 -- End -- 20 21 -- Expect stdout -- 22 [ 23 null, 24 5, 25 "xxx", 26 false 27 ] 28 -- End --
This page was automatically generated by LXR 0.3.1. • OpenWrt