Convert number to 5 letters and repeat as number increase - Javascript jQuery

Javascript examples for jQuery:Number

Description

Convert number to 5 letters and repeat as number increase

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> 
  <script type="text/javascript">
    $(window).load(function(){/*from ww w  .j  a v a2 s.  c  om*/
var letters = new Array('C', 'D', 'E', 'F', 'G');
    for (var i = 0; i < 25; i++) {
        $("#result").append(letters[i%letters.length]);
    }
});

      </script> 
 </head> 
 <body> 
  <div id="result"></div>  
 </body>
</html>

Related Tutorials