Hi fellow campers,
I seem to be getting right responses to the tests to this challenge but no green ticks - any ideas why?
Thanks
function findLongestWord(str) {
var split = str.split(" ");
var numList = [];
for (var i = 0; i < split.length; i++ ) {
array = [split[i].length];
numList.push(array);
}
numList.sort(function(a, b) {
return a - b;
});
return numList.pop().join();
}
findLongestWord("What if we try a super-long word such as otorhinolaryngology");