A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Errors/More_arguments_needed below:

TypeError: More arguments needed - JavaScript

TypeError: More arguments needed 信息
TypeError: Object.create requires more than 0 arguments
TypeError: Object.setPrototypeOf requires more than 1 argument
TypeError: Object.defineProperties requires more than 0 arguments
错误类型

TypeError.

哪里出错了?

调用函数的时候出现了错误。需要提供更多的参数。

示例

Object.create() 方法要求至少有一个参数,而 Object.setPrototypeOf() 方法要求至少有两个参数:

var obj = Object.create();
// TypeError: Object.create requires more than 0 arguments

var obj = Object.setPrototypeOf({});
// TypeError: Object.setPrototypeOf requires more than 1 argument

你可以将 null 设置为原型:

var obj = Object.create(null);

var obj = Object.setPrototypeOf({}, null);
相关

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4