code: function takeNode(hosts) {
      var index = Math.floor(Math.random() * hosts.length);
      var host = hosts[index];
      hosts.splice(index, 1);
      return host;
  }
docs: Note that this function mutates the array passed in.