Three Ways to Find the Longest Word in a String in JavaScript
Sonya Moisset
13422
My proposition:
return Math.max.apply(null, “The quick brown fox jumped over the lazy dog”.split(‘ ‘).map(function (v) { return v.length } ))
My proposition:
return Math.max.apply(null, “The quick brown fox jumped over the lazy dog”.split(‘ ‘).map(function (v) { return v.length } ))