How do:
aahilsne, aahilsnf
fit in this sequence:
aaaaaaaa, aaaaaaab, aaaaaaac, . . . , zzzzzzzy, zzzzzzzz
? In fact, how do you get from incrementing the last letter each time as in the first three entries to having all but the last letter incremented? Anyways, there might be a way to fit all that into a logical progression. For the time being there is this:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
var theStrings=[];
var aString=[97,97,97,97,97,97,97,97];
var pos=aString.length-1
function buildArray(){
var str='';
for (var i_tem = 0; i_tem < aString.length; i_tem++)
str+=String.fromCharCode(aString[i_tem]);
theStrings[theStrings.length]=str;
}
function incString(){
pos=pos<0? aString.length-1 : pos;
aString[pos--]++;
}
while (aString[0]<122){
buildArray();
incString();
}
theStrings[theStrings.length]='zzzzzzzz';
</script>
</head>
<body>
<script type="text/javascript">
for (var i_tem = 0; i_tem < theStrings.length; i_tem++)
document.write(theStrings[i_tem]+'<br>\n');
</script>
</body>
</html>
Bookmarks