I am trying to write a code to find the missing letter in a string

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;


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:

Keep in mind that javascript is case sensitive, considering that and error you are getting in the console, it should give you idea what to look at.