Skip to content

Instantly share code, notes, and snippets.

@rakin92
Last active September 5, 2019 03:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rakin92/29fa00d34d13d62971a2dc02639372ce to your computer and use it in GitHub Desktop.
Save rakin92/29fa00d34d13d62971a2dc02639372ce to your computer and use it in GitHub Desktop.
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