```
function findLongestWordLength(str) {
let arrSplit = str.split(" ");
let arsl = arrSplit.length;
let index1 = 0;
let index2 = 1;
function recurse() {
if (arsl == 1) {
return arrSplit[index1];
}
if (arsl > 1) {
if (index1.length > index2.length) {
arrSplit.splice(index2);
}
if (index1.length < index2.length) {
arrSplit.splice(index1);
}
if (arsl > 1) {
recurse()
}
}
}
return arrSplit[index1];
}
findLongestWordLength("The quick brown fox jumped over the lazy dog");
function findLongestWordLength(str) {
let arrSplit = str.split(" ");
let arsl = arrSplit.length;
let index1 = 0;
let index2 = 1;
function recurse() {
if (arsl == 1) {
return arrSplit[index1];
}
if (arsl > 1) {
if (index1.length > index2.length) {
arrSplit.splice(index2);
}
if (index1.length < index2.length) {
arrSplit.splice(index1);
}
if (arsl > 1) {
recurse()
}
}
}
return arrSplit[index1];
}
findLongestWordLength("The quick brown fox jumped over the lazy dog");
```

**Your browser information:**

User Agent is: `Mozilla/5.0 (X11; CrOS x86_64 13597.66.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.109 Safari/537.36`

.

**Challenge:** Find the Longest Word in a String

**Link to the challenge:**