I want a 5 character string composed of characters picked randomly from the set [a-zA-Z0-9].
[a-zA-Z0-9]
What\'s the best way to do this with JavaScript?
If you are using Lodash or Underscore, then it so simple:
var randomVal = _.sample('ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', 5).join('');