Tell us what’s happening:
Describe your issue in detail here.
**Your code so far**
function findLongestWordLength(str)
{
let max=0;
let arr=str.split(" ");
for(let i=0;i<arr.length;i++)
{
if(arr[i].length>max)
{
max=arr[i].length;
}
}
return max;
}
findLongestWordLength("The quick brown fox jumped over the lazy dog");
console.log( findLongestWordLength("The quick brown fox jumped over the lazy dog"))
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Safari/537.36
Challenge: Find the Longest Word in a String
Link to the challenge: