DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
js find longest word in string function
function findLongestWordLength(str) { return Math.max(...str.split(' ').map(word => word.length)); }
PREVIOUS
NEXT
Tagged:
#js
#find
#longest
#word
#string
#function
ADD COMMENT
Topic
COMMENT
Name
9+6 =
Submit