numbers and letters generator with three level nested for loop - Javascript Statement

Javascript examples for Statement:for

Description

numbers and letters generator with three level nested for loop

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
window.onload=function(){//from w  ww .  j  a v a2  s  .  c om
    var chars = "abcdefghijklmnopqrstuvwyxz";
    for(var a = 0; a < chars.length; a++) {
        for(var b = 0; b < chars.length; b++) {
            for(var c = 0; c < chars.length; c++) {
                console.log(chars[a] + chars[b] + chars[c]);
            }
        }
    }
}

      </script> 
   </head> 
   <body>  
   </body>
</html>

Related Tutorials