JS intermediate algo - Missing letters

Tell us what’s happening:

Your code so far


function fearNotLetter(str) {
  var myStr = 'abcdefghijklmnopqrstuvwxyz';
  str = str.split('');
  
  for(var i=0; i<str.length; i++){
    if(str[i] != myStr[i]){
      return myStr[i];
    }
    return undefined;
  }

  return str;
}

fearNotLetter("abce");

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36.

Link to the challenge:

Is my code incorrect???
my 1st & 2nd test cases are running but when I return undefined in the else case only the test case runs.

First, you should return undefined only if no letters are missing (currently it’ll return undefined if letters are equal).
Second, you are comparing letters from str with letters from myStr one by one. What if str doesn’t start with "a"?
Third, read through assignment again - there are only two different return cases.