when max or min is called, in javascript back end, it returns an array with the max, or min as the first element and the rest is 0.