Tell us what’s happening:
Hi, guys. I have already solved the problem using the CharCodeAt
and fromCharCode
methods. What I’d like to know is why this approach won’t work. All the tests have been passed except the last one even though it’s returning undefined.
Your code so far
function fearNotLetter(str) {
return str
.replace("abce", "d")
.replace("abcdefghjklmno", "i")
.replace("stvwx", "u")
.replace("bcdf","e")
.replace("abcdefghijklmnopqrstuvwxyz", undefined)
}
fearNotLetter("abce");
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36
.
Challenge: Missing letters
Link to the challenge:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/missing-letters