I'd like to get a random string of a certain length (determined by an input field) from an array of strings. How can I do this?
I am currently able to get a random word from the array with this:
var word = arr[Math.floor(Math.random()*arr.length)];
How do I implement the word length specification?
Aucun commentaire:
Enregistrer un commentaire