This is a fairly straghtforward and minimal port from C++ to Javascript of a random name generator, found here and orginally written by Jeff Lait.
for(var i = 0; i < 10; i += 1) {
console.log(rand_name());
}
produces output like
Geky
Gazic
Czo
Xobizb
Xazpyygi
Zkade
Z'tizkaz
C'cab
Zypi
Diu