function findLongestWordLength(s) { return s.split(' ') .reduce(function(longest, word) { return Math.max(longest, word.length) }, 0); } findLongestWordLength("The quick brown fox jumped over the lazy dog");