function findLongestWord(str) {
var longestWord = str.split(" ");
var finalWord = 0;
for(var i = 0; i < longestWord.length; i ++){
if(finalWord < longestWord[i].length){
finalWord = longestWord[i].length;
}
}
return finalWord;
}
findLongestWord("The quick brown fox jumped over the lazy dog");