Skip to content

Instantly share code, notes, and snippets.

@csharpforevermore
Created April 3, 2020 10:23
Show Gist options
  • Save csharpforevermore/93dae3ff35bf71ea4ea897de99390759 to your computer and use it in GitHub Desktop.
Save csharpforevermore/93dae3ff35bf71ea4ea897de99390759 to your computer and use it in GitHub Desktop.
JavaScript - checks string is a pangram (contains every letter of the alphabet at least once)
function isPangram(string){
return (string.match(/([a-z])(?!.*\1)/ig) || []).length === 26;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment