Im not understand why its giving me the error
TypeError: Cannot read property ‘length’ of undefined.
function findLongestWord(str) {
var array = str.split;
var word = 0;
for (var i = 0; i < array.length; i++){
if ( word < array[i].length ){
word = array[i].length;
}
}
return word;
}
findLongestWord(“The quick brown fox jumped over the lazy dog”);