DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
longest word in a string
function findLongestWordLength(str) { return Math.max(...str.split(" ").map(word => word.length)); }
Source by forum.freecodecamp.org #
PREVIOUS
NEXT
Tagged:
#longest
#word
#string
ADD COMMENT
Topic
COMMENT
Name
5+7 =
Submit