Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

Mob Programming Generator

node v14.20.1
version: 0.1.0
endpointsharetweet
const players = [ 'Paolo Rovella', 'Riccardo Caranfil', 'Tommaso Sebastianelli', 'Mahdieh Sedaghat', 'Alessio Palladino', 'Elena Giusti', 'Melisa Abuin', 'Michael Genesini', 'Simone Andreani', 'David Sorrentino' ] function shuffle(array) { let j, x, i; for (i = array.length - 1; i > 0; i--) { j = Math.floor(Math.random() * (i + 1)); x = array[i]; array[i] = array[j]; array[j] = x; } return array; } const group1 = shuffle([...players]); const group2 = group1.splice(0, players.length >> 1); console.log(`Group 1 - Valerio`) console.log(group1) console.log('Group 2 - Yaro') console.log(group2)
Loading…

no comments

    sign in to comment