Created
September 4, 2015 13:46
-
-
Save lopezjurip/341374cf3485a17ef856 to your computer and use it in GitHub Desktop.
Repartidor web js
This file contains hidden or 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 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