Advertisement
Guest User

Creat unique ID

a guest
Jan 17th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function GenerateUniqueCode(charset) {
  2.   var d = new Date();
  3.   for(var i=0;i<10;i++)
  4.   {
  5.     console.log('#'+d.getMonth()+""+Math.floor((Math.random() * 99) + 1)+""+d.getDay()+""+Math.floor((Math.random() * 99) + 1)+""+(d.getDay()+d.getMonth()+d.getFullYear()%10)+""+((d.getSeconds()+d.getUTCSeconds())+d.getMinutes()));
  6.   }
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement