find minimum value in array angular code example
Example 1: javascript minimum number in array
const min = arr => Math.min(...arr);
Example 2: Obtain smallest value from array of objects in Javascript
myArray.sort(function (a, b) {
return a.Cost - b.Cost
})
var min = myArray[0],
max = myArray[myArray.length - 1]