Find the Longest Word in a String/ type error

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”);

you may want to check your use of .split as you aren’t defining a parameter for how to split the string

thanks, i always miss stuff like that.