Tell us what’s happening:
My code is doing what it is supposed to do, but I’m not passing. When I do the tests the answers are correct.
Your code so far
let az=('abcdefghijklmnopqrstuvwxyz')
let AZ=az.split('')
function fearNotLetter(text){
let textSplit=text.split('');
if (textSplit===AZ){
return undefined
}
let compareText='';
let wrongLetter=''
for (let i=0;i<AZ.length;i++){
if (AZ[i]===textSplit[0]){
compareText=AZ.splice(i,textSplit.length)
}
}
for (let i=0;i<textSplit.length;i++){
if (textSplit[i]!==compareText[i]){
wrongLetter=compareText[i]
break;
}
}
return wrongLetter
}
console.log(fearNotLetter("abcdefghjklmno"))
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36
Challenge Information:
Build a Missing Letter Detector - Build a Missing Letter Detector