function findLongestWordLength(str) {
let maxLength = 0;
let result = '';
let splitted = str.split(" ");
for(i = 0; i < splitted.length; i++){
if(splitted[i].length > maxLength){
maxLength = splitted[i].length;
result = maxLength;
}
}
return result;
}
console.log(findLongestWordLength("The quick brown fox jumped over the lazy dog"));
Pls Whats wrong with my code?