Missing letters javascript help

please help with my code, i don’t know how to finish this problem, checked over everything and don’t know what to do next

please provide your code - not a screenshot - and the link to the challenge you are asking about

here

function fearNotLetter(str) {
  
  let allLettersMan = 'abcdefghijklmnopqrstuvwxyz';
  allLettersMan = allLettersMan.split("");
  str = str.split("");

  if(str[0] !== 'a') {
    return undefined;
  }
  
  for(let i in str) {
    if(str[i] !== allLettersMan[i]) {
      return allLettersMan[i]
    }
  }
  
  return str;
}

fearNotLetter("abce");

missing letters problem

I see two issues.

  1. You aren’t handling the case where you start with a letter that is not a

  2. You aren’t returning the correct value if the entire alphabet is there

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.