1
The following script found here in 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;
Exit:
aaa
aab
aac
...
aba
abb
abc
...
zzy
zzz
My intention is to continue this logic, but including special characters, using String.fromCharCode()
from 33 to 126.
This numeric range already includes all the special characters, letters and numbers.
The desired output should contain 16 characters, not only the three above.
What modifications would be required in the script to perform this task?
I will test as soon as possible and give feedback. Thank you.
– Jhonatan Pereira