Skip to content

Instantly share code, notes, and snippets.

@lopezjurip
Created September 4, 2015 13:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lopezjurip/341374cf3485a17ef856 to your computer and use it in GitHub Desktop.
Save lopezjurip/341374cf3485a17ef856 to your computer and use it in GitHub Desktop.
Repartidor web js
var turn = 0;
console.log(['LosExtraterrestresMusicales', 'Rupie', 'TheTeam', 'Veritas',
'YisusPlusOne', 'ImaginApp', 'Nebuchadnezzar', 'Rock',
'InternalServerError', 'String.random', 'ZipCity2000',
'PW:Software', 'ToPa', 'tqzptscsaj',]
.sort(.5 - Math.random())
.reduce(function(previous, current) {
previous[['pato', 'thomas', 'pedro'][turn++ % 3]].push(current);
return previous;
}, {pato: [], thomas: [], pedro: []}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment