It is fine to convert everything to lowercase but you don’t need an if/else statement like you have here.
Remove all of that and just convert the two words to all lowercase.
So essentially, just keep this part here
First, I do want to commend you on your thinking with this challenge. You adapted a clever solution. But, to answer your most recent question, the challenge is specific in its verbiage on how to complete it:
It doesn’t ask you to compare lengths and swap around the position of the first and second word based on their lengths. It says to return true only if all of the letters in the first element of the array contain all of the letters in the second element.
Since, in the test, “date” is the 2nd word and “ate” is the first word, “date” has an extra d that is not in “ate” and should return false. That’s why @jwilkins.oboe said to remove the if/else logic that swaps around which word is first and which is second, because it’s not applicable to this challenge.