Find largest integer in array

I’ve got an array:


//for instance
distances[24,30,3];

How can I find the largest integer in it? Basically want to use it as “top score” kind of thing.