Tell us what’s happening:
i cant identify the error in my code .
Your code so far
function fearNotLetter(str) {
var missing;
for (let i = 0; i < str.length; i++) {
if (str.charCodeAt(i) !==str.charCodeAt(i - 1) + 1) {
missing = string.fromCharCode(str.charCodeAt(i - 1) + 1);
}
}
return missing;
}
console.log(fearNotLetter("abce"));
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36
.
Challenge: Missing letters
Link to the challenge: