How do you find the min and max element of the array?
Find max value
console.log(Math.max(...items)); // 40
Find min value
console.log(Math.min(...items)); // 5
BY Best Interview Question ON 10 Aug 2022
console.log(Math.max(...items)); // 40
console.log(Math.min(...items)); // 5