Find longest word in a string.
function findLongestWord(str) {
var strArray = str.split(" "),
arrCount = [];
for (var i = 0; i < strArray.length; i++) {
arrCount.push(strArray[i].length);
}
return Math.max(...arrCount);
}
findLongestWord("The quick brown fox jumped over the lazy dog");