function requestRoomKey(callback) {
  socket.emit('getRoomCode')

  socket.on('roomCreated', function(roomKey) {
    return callback(roomKey)
  })
}
//emits an event to server to ask for code
emits an event to server to ask for code
emits an event to server to ask for code
function requestRoomKey(callback) {
  socket.emit('getRoomCode')
  socket.on('roomCreated', function(roomKey) {
    return callback(roomKey)
  })
}
function requestRoomKey ( callback ) { socket . emit ( 'getRoomCode' ) socket . on ( 'roomCreated' , function ( roomKey ) { return callback ( roomKey ) } ) }
emits an event to server to ask for code
emits an event to server to ask for code