New learners will not be able to solve this problem without split method. However, split method comes after this challenge. Please alert learners to use a code concept they have not encountered yet.
Ah…well no. It Math is a core module from the JS library. I am not sure if it is taught in the fCC curriculum, but it is definitely mentioned somewhere.
At the end of the day, some of the challenges do require a small amount of external research from campers. But, this is why we have the guide posts.
So, for now, I will add the above solution (i changed it to exclude Math.abs) as the first solution, and leave the other solutions, as they are still valid.
Also, the simplest solution would probably involve regex:
// Loop through each match
function findLongestWordLength(str) {
const arrayOfStr = str.match(/(?<=\s*)\w+/gi);
// Loop through
}