Javascript 这种写法太清晰了。 使用了
return Math.max.apply(Math, str.split(" ").map(function(el) { return el.length;}));