Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1439 How can I show all the lower case letter combinations from a to zzzz?

You are here: irt.org | FAQ | JavaScript | Number | Q1439 [ previous next ]

Try:

<script language="JavaScript"><!--
var letters = " abcdefghijkmlnopqurstuvxyz";
var cc=bb=0
for (var d=0; d<=26; d++) {
  for (var c=0+cc; c <=26; c++) {
    for (var b=0+bb; b<=26; b++) {
      for (var a=1; a<=26; a++) {
        document.write(letters.substring(d,d+1) + letters.substring(c,c+1) + letters.substring(b,b+1) + letters.substring(a,a+1) + '<br>');
      }
      bb=cc=1;
    }
  }
}
//--></script>

©2018 Martin Webb