Simple name generator in JavaScript