How To Generate An Alphabet Array With JavaScript

node v14.19.3
version: 1.0.0
endpointsharetweet
function generateAlphabet(capital = false) { return [...Array(26)].map((_, i) => String.fromCharCode(i + (capital ? 65 : 97))); } generateAlphabet();
Loading…

no comments

    sign in to comment