function create(var_args) {
  const argLength = arguments.length;
  if (argLength == 1 && Array.isArray(arguments[0])) {
    return create.apply(null, arguments[0]);
  }

  if (argLength % 2) {
    throw new Error('Uneven number of arguments');
  }

  const rv = {};
  for (let i = 0; i < argLength; i += 2) {
    rv[arguments[i]] = arguments[i + 1];
  }
  return rv;
}
Creates a new object built from the key-value pairs provided as arguments.
@param {...*} var_args If only one argument is provided and it is an array
    then this is used as the arguments, otherwise even arguments are used as
    the property names and odd arguments are used as the property values.
@return {!Object} The new object.
@throws {!Error} If there are uneven number of arguments or there is only one
    non array argument.