Tell us what’s happening:
I think the logic is good but I got undefined for charCodeAt and I don’t know why…
Your code so far
function fearNotLetter(str) {
let word = str.split("");
word.map(function (letter, index) {
if (index + 1 <= word.length && letter.charCodeAt(0) + 1 !== letter[index + 1].charCodeAt(0)) {
let conver = letter.charCodeAt(0) + 1;
return String.fromCharCode(conver);
} else {
return undefined;
}
});
}
fearNotLetter("abce");
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/missing-letters