Skip to content

Instantly share code, notes, and snippets.

@bendc
Created January 30, 2015 21:38
Show Gist options
  • Save bendc/1e6af8f2d8027f2965da to your computer and use it in GitHub Desktop.
Save bendc/1e6af8f2d8027f2965da to your computer and use it in GitHub Desktop.
Array of uppercase and lowercase letters
const letters = (() => {
const caps = [...Array(26)].map((val, i) => String.fromCharCode(i + 65));
return caps.concat(caps.map(letter => letter.toLowerCase()));
})();
@DevManFitz
Copy link

["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]

W mans

@ianlaurindotolotti
Copy link

Legend

@fwextensions
Copy link

In case anyone needs the full set of lower and upper case Latin characters (all of the various accented versions), built from this table:

const lowercaseString = "abcdefghijklmnopqrstuvwxyzàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķĺļľŀłńņňŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżžƃƅƈƌƒƙơƣƥƨƭưƴƶƹƽdžljnjǎǐǒǔǖǘǚǜǟǡǣǥǧǩǫǭǯdzǵǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗɓɔɗɘəɛɠɣɨɩɯɲɵʃʈʊʋʒḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹ";
const lowercaseChars = [...lowercaseString];
const uppercaseChars = [...lowercaseString.toLocaleUpperCase()];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment