Skip to content

Instantly share code, notes, and snippets.

@SirPepe
Created July 16, 2013 09:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SirPepe/6007348 to your computer and use it in GitHub Desktop.
Save SirPepe/6007348 to your computer and use it in GitHub Desktop.
var names = [
'ThomasP',
'christian',
'Bruno',
'Sascha',
'André',
'Robert',
'claudius',
'gewe',
'Carsten',
'Robert',
'Andreas Otten',
'Tom',
'Marius',
'Josua',
'Harald',
'Chris',
'Andreas',
'Benjamin Wagener',
'IJ'
];
// > undefined
names[Math.floor(Math.random() * names.length)];
// > 'Robert'
names[Math.floor(Math.random() * names.length)];
// > 'christian'
names[Math.floor(Math.random() * names.length)];
// > 'Marius'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment