Need help in this.thanks in advance

Tell us what’s happening:

find the longest word in a string

Your code so far

function findLongestWordLength(str) {

 var splitString=str.split("");

 var biggestWord=0;

 for(var i=0;i < splitString.length; i++){

 if(biggestWord<splitString[i].length){

 biggestWord=splitString[i].length;

}

}

return biggestWord;

}

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; rv:80.0) Gecko/20100101 Firefox/80.0.

Challenge: Find the Longest Word in a String

Link to the challenge:

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

what do you think is the value of splitString here?

I think the value is one

thanks got the answer