code: function (obj /*, arguments */) {
      var stack = [obj];
      var leaf = true;
      for (var i = 1; i < arguments.length - 1; i++) {
        var key = arguments[i];
        if (!(key in obj)) {
          leaf = false;
          break;
        }
        obj = obj[key];
        if (typeof obj !== "object")
          break;
        stack.push(obj);
      }
  
      for (var i = stack.length - 1; i >= 0; i--) {
        var key = arguments[i+1];
  
        if (leaf)
          leaf = false;
        else
          for (var other in stack[i][key])
            return; // not empty -- we're done
  
        delete stack[i][key];
      }
    }
docs: _delete(a, b, c, d) deletes a[b][c][d], then a[b][c] unless it isn't empty, then a[b] unless it isn't empty.