I need to increment a string from.. let\'s say aaa
to zzz
and write every incrementation in the console (is incrementation even a word?). It would go s
Interesting approach with Number#toString
:
var n = 13330
var ns = []
for(var i = 0; i < 26; i++) {
for(var j = 0; j < 26; j++) {
for(var k = 0; k < 26; k++) {
ns.push(n.toString(36))
n++
}
n += 10 // jump from '(x)0' to '(x+1)a', etc.
}
n += 360 // jump from '(x)0a' to '(x)aa', etc.
}
console.log(ns) // the strings you wanted