var users = 10; var needed = 5; var already_picked = []; for(var i = 0;i