Write a function minMax(numbers) that returns an object { min, max } with the smallest and the largest number of an array. The array is not empty. Do not use Math.min or Math.max.
minMax([3, -2, 8, 0])Returns { min: -2, max: 8 }
minMax([7])Returns { min: 7, max: 7 }
minMax([ 3, -2, 8, 0 ]){ min: -2, max: 8 }minMax([ 7 ]){ min: 7, max: 7 }Hidden tests run on Submit.