Tell us what’s happening:
My function is passing every test except 4 and 5. I need to understand how to slice from the string’s starting position, not just from the alphabet’s beginning. I would appreciate any guidance to resolve this issue.
Your code so far
const alphabet = "abcdefghijklmnopqrstuvwxyz"
function fearNotLetter(string) {
const targetString = alphabet.slice(string[0])
for(let char of targetString) {
if(string.includes(char) === false) {
return char
}
}
return undefined
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36
Challenge Information:
Build a Missing Letter Detector - Build a Missing Letter Detector