Last active
September 5, 2019 03:50
-
-
Save rakin92/29fa00d34d13d62971a2dc02639372ce to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function listMissingLetters(str) { | |
let alphabets = "abcdefghijklmnopqrstuvwxyz"; | |
let missingChars = ''; | |
for(let i = 0; i < alphabets.length; i++){ | |
if(!str.includes(alphabets[i])){ | |
missingChars += alphabets[i]; | |
} | |
} | |
return missingChars; | |
} | |
console.log(listMissingLetters('some letters are missing')); | |
console.log(listMissingLetters('i can write from a to z: abcdefghijklmnopqrstuvwxyz')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment