Skip to content
Advertisement

Generate random string/characters in JavaScript

I want a 5 character string composed of characters picked randomly from the set [a-zA-Z0-9].

What’s the best way to do this with JavaScript?

Advertisement

Answer

I think this will work for you:

JavaScript
Advertisement