Skip to content

Instantly share code, notes, and snippets.

@vlad-bezden
Created October 27, 2016 21:56
Show Gist options
  • Save vlad-bezden/2a0db07e4586f3732defead3e8dc4ddd to your computer and use it in GitHub Desktop.
Save vlad-bezden/2a0db07e4586f3732defead3e8dc4ddd to your computer and use it in GitHub Desktop.
Pangrams

Pangrams

The word pangram comes from the Greek for all letters (pan = ALL + grámma = LETTER). A pangram is a series of words which contains all the letters of the alphabet.

The Quick Brown Fox Jumps Over The Lazy Dog

A Pen by Vlad Bezden on CodePen.

License.

console.clear()
const text = 'The Quick Brown Fox Jumps Over The Lazy Dog'
Array.from([...text.toLowerCase()]
.reduce((p, c) => (p.set(c, (p.get(c) || 0) + 1), p), new Map())
.entries())
.sort((a, b) => a[0].localeCompare(b[0]))
.forEach(x => console.log(x))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment