Skip to content

Instantly share code, notes, and snippets.

@mcunha98
Created April 16, 2021 16:13
Show Gist options
  • Save mcunha98/b04f93354dfc90d634c902d38937f7b0 to your computer and use it in GitHub Desktop.
Save mcunha98/b04f93354dfc90d634c902d38937f7b0 to your computer and use it in GitHub Desktop.
//generate a random string and return the substring of N chars at the end
var rnd = "ABCDEF23456789".split('').sort(function(){return 0.5-Math.random()}).join('').substring(0, 6);
//OUTPUT:
//BC3A095
//C3FA295
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment