-
-
Save shridharkalagi/aa427250796a18eb3eed9f4517cfa9ac to your computer and use it in GitHub Desktop.
Javascript generate alphabet string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
https://ariya.io/2013/07/sequences-using-javascript-array //For reference