Tell us what’s happening:
Describe your issue in detail here.
i want to write the alphabet in new variable and want to compare it with the provided string , but i do not know how to do it , can someone help me please
**Your code so far**
function fearNotLetter(str) {
let alphabet = 'abcdefghijklmnopqrstuvwxyz'
for(var i=0; i<str.length; i++){
}
return undefined;
}
console.log(fearNotLetter("abce"));
I’m not sure I understand what this means? Can you give us a little more detail on how you want to compare the alphabet string to the string passed into the function?
Pretend you don’t already know the alphabet. Or if that is too hard, describe the process to someone who doesn’t know the alphabet. But even if you know the alphabet, you are still going through a process to figure out which letter is missing.
OK, we are starting to get somewhere. It sounds like you want to do a comparison letter by letter in str with the alphabet. So you are going to start at the beginning of str and go through each letter in str. It looks like you have set up the for loop to do that. I’m assuming you know how to access an individual character in a string? If not then you have some googling to do.
Once you know how to access each individual character in str then you know how to access an individual character in alphabet as well. The twist is that you need to figure out where the first letter in str is located in alphabet so you know where to start in alphabet.
I’ve got to run for the night (I’m old and it’s getting late here). Good luck. Hopefully I gave you enough to go on.