Tell us what’s happening:
Describe your issue in detail here.
Hello,
My code passes all the tests except the last one which should return undefined. Can someone help me identify my mistake?
**Your code so far**
function fearNotLetter(str) {
let myArr = str.split("");
console.log(myArr[0].charCodeAt(0));
for(let i = 0; i < myArr.length; ++i) {
if(myArr[i+1].charCodeAt(0) - myArr[i].charCodeAt(0) > 1) {
let letter = String.fromCharCode(myArr[i].charCodeAt(0) + 1);
console.log(letter);
return letter;
}
}
}
fearNotLetter("abce");
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36
Concerning the first code you posted, change the function call at the end to use the test case that is failing:
fearNotLetter("abcdefghijklmnopqrstuvwxyz");
You should see an error message in the console pane below the editor. The FCC tests can hide these messages from you so it’s not so obvious why a test is failing.