js menemukan kata terpanjang dalam fungsi string
function findLongestWordLength(str) {
return Math.max(...str.split(' ').map(word => word.length));
}
Tiger King
function findLongestWordLength(str) {
return Math.max(...str.split(' ').map(word => word.length));
}