Guest User

Untitled

a guest
May 23rd, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. const genCode = (len) => {
  2. let text = "";
  3. let possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
  4.  
  5. for (let i = 0; i < len; i++)
  6. text += possible.charAt(Math.floor(Math.random() * possible.length));
  7. return text;
  8. }
Add Comment
Please, Sign In to add comment