joelnazarene

random chars

Mar 10th, 2020
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.25 KB | None | 0 0
  1. var lenn=document.getElementById("num");
  2.  
  3.    var arr='abcdefghijklmnopqrstuvwxyz0123456789';
  4.    
  5.   var a='';
  6.   for(let i=0;i<lenn;i++){
  7.     var pos=Math.random()*(35-0);
  8.    a=a+arr[pos];
  9.  
  10.  
  11.  
  12.  }
  13.  
  14.  document.getElementById("demo").innerHTML = a;
Add Comment
Please, Sign In to add comment