home ~ socials ~ projects ~ rss

Create An Array With The Letters Of The Alphabet

January 2022
const letters = [...Array(26)].map((_, i) => String.fromCharCode('A'.charCodeAt(0) + i));

this produces an array of upper case letters

end of line
Share link:
https://www.alanwsmith.com/en/23/rg/la/vt/?create-an-array-with-the-letters-of-the-alphabet