function getMissingAlphabetChars(input: string): string[] {
const present = new Set<string>();
// Normalize: lowercase + keep only a–z
for (const ch of input.toLowerCase()) {
if (ch >= "a" && ch <= "z") {
present.add(ch);
}
}
// Collect missing letters
const missing: string[] = [];
for (let code = 97; code <= 122; code++) { // 'a'..'z'
const letter = String.fromCharCode(code);
if (!present.has(letter)) {
missing.push(letter);
}
}
return missing;
}
const missing = getMissingAlphabetChars("TypeScript Programming");
console.log(missing);
/*
run:
["b", "d", "f", "h", "j", "k", "l", "q", "u", "v", "w", "x", "z"]
*/