Created
June 5, 2014 18:43
-
-
Save guyellis/caf8604ab2fc4583235c to your computer and use it in GitHub Desktop.
Name generators
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 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]); | |
} | |
} | |
} | |
} | |
} | |
} |
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 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