find longest sequence in a string in js code example
Example: js find longest word in string function
function findLongestWordLength(str) {
return Math.max(...str.split(' ').map(word => word.length));
}
function findLongestWordLength(str) {
return Math.max(...str.split(' ').map(word => word.length));
}