I have this code for a class where I\'m supposed to use the reduce() method to find the min and max values in an array. However, we are required to use only a single call to
const values = [1,2,3,4,5]; const [first] = values; const maxValue = values.reduce((acc, value) => Math.max(acc, value), first);