Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Detect Pangram

/*
	// A pangram is a sentence that contains every single letter of the alphabet at 
    least once. For example, the sentence "The quick brown fox jumps over the lazy 
    dog" is a pangram, because it uses the letters A-Z at least once 
    (case is irrelevant).
	// Given a string, detect whether or not it is a pangram. Return True if it is, 
    False if not. Ignore numbers and punctuation.
*/

const isPangram = string => [... new Set(string.replace(/[d|W|s|_]/gi, "")
                                         .toLowerCase())].length === 26


// With love @kouqhar
Source by www.codewars.com #
 
PREVIOUS NEXT
Tagged: #Detect #Pangram
ADD COMMENT
Topic
Name
6+2 =