Skip to content

Instantly share code, notes, and snippets.

@guyellis
Created June 5, 2014 18:43
Show Gist options
  • Save guyellis/caf8604ab2fc4583235c to your computer and use it in GitHub Desktop.
Save guyellis/caf8604ab2fc4583235c to your computer and use it in GitHub Desktop.
Name generators
var vowels = ['a','e','i','o','u'];
var alphabet = 'bcdfghjklmnpqrstvwxyz';
for(var a=0; a<alphabet.length; a++) {
for(var v1=0; v1<vowels.length; v1++) {
for(var b=0; b<alphabet.length; b++) {
for(var c=0; c<alphabet.length; c++) {
for(var v2=0; v2<vowels.length; v2++) {
for(var d=0; d<alphabet.length; d++) {
console.log(alphabet[a] + vowels[v1] + alphabet[b] + alphabet[c] + vowels[v2] + alphabet[d]);
}
}
}
}
}
}
var vowels = ['a','e','i','o','u'];
var alphabet = 'bcdfghjklmnpqrstvwxyz';
var accumulator = '';
var counter = 0;
for(var a=0; a<alphabet.length; a++) {
for(var v1=0; v1<vowels.length; v1++) {
for(var b=0; b<alphabet.length; b++) {
var word = alphabet[a] + vowels[v1] + alphabet[b];
accumulator += word + '\t';
if(counter++ % 0 === 0) {
accumulator += '\n';
}
}
}
}
console.log(accumulator);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment