Skip to content

Instantly share code, notes, and snippets.

@mattbierner
Created February 18, 2014 05:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattbierner/9065171 to your computer and use it in GitHub Desktop.
Save mattbierner/9065171 to your computer and use it in GitHub Desktop.
var words = function(count, wl) {
var out = [];
for (var i = 0; i < count; ++i) {
var len = Math.ceil(Math.random() * wl);
var w = '';
while (len--)
w += String.fromCharCode('a'.charCodeAt(0) + Math.floor(Math.random() * 26))
out.push(w);
}
return out;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment