- Edited
The description in the documentation is really simple and maybe it is because these methods were not made with 2d arrays in mind but since the docs say that if the elements cant be compare the result will be null, but these do compare in same way I thought maybe there's a logic to these results that is not explained in the docs.
Basically I was experimenting with min and max in 2d arrays holding strings and came up with this:
var arr :Array = [["Taaaa",6,"yaa"],["T",10,"yaa"],["Teeee",7,"yaa"]]
print(arr.max()) #result ["Teeee",7,"yaa"]
print(arr.min()) #result ["Teeee",7,"yaa"]
both of these have the same value and I was wonder how could that be, while playing with the methods I realised it cares about length of the strings and the alphabetical order and it seems to be case sensitive
var arr :Array = [["Taaaa",6,"yaa"],["T",10,"yaa"],["Zeeee",7,"yaa"]]
print(arr.max()) #result ["Zeeee",7,"yaa"]
print(arr.min()) #result ["Zeeee",7,"yaa"]
var arr :Array = [["taaaa",6,"yaa"],["T",10,"yaa"],["Zeeee",7,"yaa"]]
print(arr.max()) #result ["taaaa",6,"yaa"]
print(arr.min()) #result ["Zeeee",7,"yaa"]