Pangrams

  • + 0 comments

    My TypeScript solution:

    function pangrams(s: string): string {
        const alphabet = "abcdefghijklmnopqrstuvwxyz";
        const ALPH_LENGTH = 26;
        
        for (let i = 0; i < ALPH_LENGTH; i++) {
            if (!s.toLocaleLowerCase().includes(alphabet[i])) 
                return "not pangram";
        }
        
        return "pangram";
    
    }