fixed LongestWord.js, now works for coderbyte test cases