Find the Longest Word in a String
Return the length of the longest word in the provided sentence.
Your response should be a number.
Tests
- Waiting: 1.
findLongestWordLength("The quick brown fox jumped over the lazy dog")
should return a number. - Waiting: 2.
findLongestWordLength("The quick brown fox jumped over the lazy dog")
should return6
. - Waiting: 3.
findLongestWordLength("May the force be with you")
should return5
. - Waiting: 4.
findLongestWordLength("Google do a barrel roll")
should return6
. - Waiting: 5.
findLongestWordLength("What is the average airspeed velocity of an unladen swallow")
should return8
. - Waiting: 6.
findLongestWordLength("What if we try a super-long word such as otorhinolaryngology")
should return19
.
/** * Your test output will go here */