String Challenge

I have been trying to solve the string challenge which returns the string true if every single letter of the English alphabet exists in the string, otherwise return the string false my output is showing correct result but it’s also showing undefined with the output as well.
I am attaching my code for more reference :

function StringChallenge(str) { 
 let exist =[];
 for (let i=0; i <str.length; i++){
   exist[str[i]]=1;
 }
 for (let i=0 ; i<=25; i++){
  let  c = String.fromCharCode(i);
   if (!exist [c]){
     console.log( false);
     break;
   }
   return str;
 } 


};

console.log(StringChallenge("abcdefghijklmnopqrstuvwxyyyy"));

Current Output :
false
undefined

Desired Output :
false

@RandellDawson please help. It’s urgent.

On every challenge on the lower corner of the left you can see the tests been tried on your code. Try to see what inputs are passed to your function to understand which one is returning undefined and why.

Moreover, returning false or true is not the same as console.log(false). The first one is a value returned by the function when called, while the latter is just displaying false on console.

If your function is supposed to return true or false, then your return statements need to do that. Currently, I see one return statement that appears to return a string character.

If all you need to do is confirm that every English letter exists, then all you have to do is iterate through each character of the string (no need for arrays) and check if you find a character that is not the lowercase version’s ascii code between 97 (letter a) and 122 (letter z). As soon as one is not found, return false. If you make it through the entire string (meaning you never return false), then return true.

That is the algorithm.