The following script found here in the Stack prints from "aaa" to "zzz" by incrementing letters in order, one by one:
var str= 'aaa',
s= str;
while(str!=='zzz') {
str= ((parseInt(str, 36)+1).toString(36)).replace(/0/g,'a');
s+= '<br/> '+str;
}
document.body.innerHTML= s;
Output:
aaa
aab
aac
...
aba
abb
abc
...
zzy
zzz
My intention is to continue this logic, but including special characters, using String.fromCharCode()
of index 33 to 126.
This numeric range already includes all special characters, letters, and numbers.
The desired output should contain 16 characters, not just the three above.
What modifications would be needed in the script to accomplish this task?