for (...) { smallest = Math.min(minAndMax[i], smallest); largest = Math.max(minAndMax[i], largest); }