javascript find the longest string in array

JavaScript
Math.max(...(x.map(el => el.length)));

Source

Also in JavaScript: