js check string for pangram code example
Example: js check string for pangram
//Detect Pangram
function isPangram(string){
// character set capturing group with negative lookahead
let regex = /([a-z])(?!.*\1)/gi;
return (string.match(regex)).length === 26;
}
console.log(isPangram("The quick brown fox jumps over the lazy dog."));// true
console.log(isPangram("This is not a pangram."));// false
console.log(isPangram("Pack my box with five dozen liquor jugs."));// true