1 Replies - 298 Views - Last Post: 05 March 2012 - 10:53 AM

#1 stomasz  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 05-March 12

Question regarding Javascript password generator

Posted 05 March 2012 - 10:51 AM

How do I fix this so it creates a password consisting of 6 letters AND THEN 4 digits, this is what I have thus far.

 <script type="text/javascript"> letters="abcdefghijklmnopqrstuvwxyz"; document.write("Suggested password: "); numLetters=0;
while (numLetters < 6) { x=Math.floor(Math.random()*26); y=x+1; document.write(letters.substring(x, y)); numLetters = numLetters + 1;
} </script>   


Is This A Good Question/Topic? 0
  • +

Replies To: Question regarding Javascript password generator

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9567
  • View blog
  • Posts: 36,220
  • Joined: 12-June 08

Re: Question regarding Javascript password generator

Posted 05 March 2012 - 10:53 AM

Please do not open duplicate topics. Thank you.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1