DEV Community

Matt Kenefick
Matt Kenefick

Posted on

Javascript: Alphabet as array

Quick and easy way to get alphabetical characters into an array in Javascript.

String.fromCharCode(...Array(123).keys()).slice(97).split('');

// ["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"]
Enter fullscreen mode Exit fullscreen mode


`

Top comments (0)