Created
February 18, 2014 05:34
-
-
Save mattbierner/9065171 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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