I am trying to write a basic javascript function to find the longest word in a string and log it\'s length.
So far I have:
function findLongestWord(
Your statement
words.push(str.split(" "));
should be
words=str.split(" ")
And @Tushar solved the rest of your "problems" too ... ;-)