Skip to content

Instantly share code, notes, and snippets.

@borm
Forked from mreigen/generate-alphabets.js
Created August 6, 2020 00:44
Show Gist options
  • Save borm/399b92f9f217a12e5d8e1c17f01a18c9 to your computer and use it in GitHub Desktop.
Save borm/399b92f9f217a12e5d8e1c17f01a18c9 to your computer and use it in GitHub Desktop.
Javascript generate alphabet string
function generateAlphabets() {
var alphabets = [];
var start = 'A'.charCodeAt(0);
var last = 'Z'.charCodeAt(0);
for (var i = start; i <= last; ++i) {
alphabets.push(String.fromCharCode(i));
}
return alphabets.join('');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment