You are viewing a single comment's thread. Return to all comments →
My solution for typescript:
function pangrams(s: string): string { const ALPHABET_LENGTH = 26; const IS_PANGRAM = 'pangram'; const IS_NOT_PANGRAM = 'not pangram' const isValidChar = (char: string): boolean => char !== ' '; return new Set(s .split('') .reduce((acc, char) => { return isValidChar(char) ? [...acc, char.toLowerCase()] : acc; }, [])).size === ALPHABET_LENGTH ? IS_PANGRAM : IS_NOT_PANGRAM; }
Seems like cookies are disabled on this browser, please enable them to open this website
Pangrams
You are viewing a single comment's thread. Return to all comments →
My solution for typescript: