How could this one be tweaked so that it could increment a set of two letters, so that it'd look like this:
AA, AB, AC...AZ, BA, BB, BC, etc
This is borrowed from tckmn, but it addresses one letter only.
var alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('')
function incrementChar(c) {
var index = alphabet.indexOf(c)
if (index == -1) return -1 // or whatever error value you want
return alphabet[index + 1 % alphabet.length]
}
Appreciate your help!