javascript get max string in array code example
Example 1: javascript array find highest value of array of objects by key
Math.max.apply(Math, array.map(function(o) { return o.y; }))
Example 2: javascript find the longest string in array
Math.max(...(x.map(el => el.length)));