Skip to content

Instantly share code, notes, and snippets.

@saeedghx68
Last active December 18, 2017 07:44
Show Gist options
  • Save saeedghx68/fe1a7ccd5885f85b8cd6e6ba872af7d5 to your computer and use it in GitHub Desktop.
Save saeedghx68/fe1a7ccd5885f85b8cd6e6ba872af7d5 to your computer and use it in GitHub Desktop.
Generate unique id for using reporting in javascript
String.fromCharCode(Math.floor(Math.random() * (90 - 65) + 65)) + '-' + (+new Date()).toString().substr(1).match(/.{4}/g).join('-')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment