Your code only passes all the tests except one because the second word in all them is shorter than or as long as the first (excepting ["Mary", "Aarmy"] which your code passes, only because the extra letter is also in the first word). The only case in which this is not the case ["ate", "date"] your code doesn’t pass. Your code should return false here, but returns true because your loop is only 3 letters long.
Think about this, and try to determine which word is longest. Hope this is of help to you.