Tell us what’s happening:
Describe your issue in detail here.
**Your code so far**
function findLongestWordLength(str) {
let myRegex = /\w+/mig;
const result = str.match(myRegex);
// console.log(result);
for(let i=0; i<result.length; i++){
console.log(result[i].length);
let arr=[];
arr.push(result[i].length);
console.log(arr);
}
}
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.164 Safari/537.36 OPR/77.0.4054.277
use conditionals (if statement) to check if the length of the each word is greater than your variable, if it is greater you then assign that as the new value of your variable.