Issues with Missing letters

Tell us what’s happening:
I’m having trouble with this challenge. When I run each of the test cases they seem to work but I’m not getting the go ahead to move on to the next challenge. Any idea what I’m doing wrong?

Your code so far

missNum = [];
missLet = [];
isLast = "true";
function fearNotLetter(str) {
  //creates an array of corresponding character codes
  for (i=0; i<str.length; i++) {
  //checks if the next character code is correct
  for (a=0; a<charCodes.length; a++) {
  if (charCodes[a+1] !== charCodes[a]+1 && charCodes[a+1] !== undefined) {
    //pushes the missing code to an array
    // translates missing character code to missing letter
    missLet = String.fromCharCode(missNum[0]);
    isLast = "fasle";
    return missLet;
  // if there is no missing letter returns undefined
  if (isLast !== false) {
    return "undefined";

**Your browser information:**

Your Browser User Agent is: ```Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36```.

**Link to the challenge:**

Are there any tests that actually fail when they’re all ran (instead of your own testing I mean)? Perhaps the problem is your global variables not being reset between calls?

Otherwise there are sometimes issues requiring a full refresh of the page, but I’d try keeping those variables local in the function first

Edit: also there’s a typo in the string "fasle", and both of those can just be made the boolean true or false instead of strings

capital C

typo error

What do you mean by capital C? fromCharCode is the name of the function!

1 Like

sorry my bad :sweat_smile: