code: function remove(connection, connections) {
    for (var i = 0; i < connections.length; i++) {
      if (connections[i] === connection) {
        connections.splice(i, 1);
        return true;
      }
    }
  }
docs: Remove connection method