SOURCE

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");
console 命令行工具 X clear

                    
>
console