The front end Gets the maximum and minimum values in the array January 4, 2024 by Kartik Grewal No Comments var array = [20.10.30.25.50]; let max = Math.max.apply(null,arr.join(",").split(",")); let min = Math.min.apply(null,arr.join(",").split(",")); console.log(max); / / 50 console.log(min); / / 10 Copy the code