Tell us what’s happening:

hello guys i know what is going on but i cant really wrap my head around it if it dosent start at alphabets[i]
then it returns a
Your code so far

function fearNotLetter(str) {
var alphabets = "abcdefghijklmnopqrstuvwxyz";
alphabets = alphabets.split("");

str = str.split("");

for(var i = 0; i < str.length; i++){

  if(str[i] != alphabets[i]){
    return alphabets[i];

return alphabets;


Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36.

Challenge: Missing letters

Link to the challenge:

is there something that tells you what’s the index of a particular character?

You’re close. How about if you get the indexOf position in that alphabet of the first character from the string passed into your function? Then, as you increment to the next character in the passed string, you also increment to the next index in the alphabet - if the characters don’t match, increment that alphabet index until they do and indicate somehow that there was a gap?

thank you i solved it :smiley:

1 Like