Movatterモバイル変換


[0]ホーム

URL:


  1. Tecnología web para desarrolladores
  2. JavaScript
  3. Referencia de JavaScript
  4. JavaScript error reference
  5. TypeError: More arguments needed

Esta página ha sido traducida del inglés por la comunidad.Aprende más y únete a la comunidad de MDN Web Docs.

View in EnglishAlways switch to English

TypeError: More arguments needed

Mensage

TypeError: argument is not an Object and is not null (Edge)TypeError: Object.create necesita al menos 1 argumento, pero solo only 0 fueron aprovadas.TypeError: Object.setPrototypeOf necesita al menos 2 argumentos, pero solo 0 fueron aprovadosTypeError: Object.defineProperties requires at least 1 argument, but only 0 were passed

Tipo de error

TypeError.

¿Qué fué mal?

Hay un error con que una funcion es llamada. Más argumentos necesitan ser dados.

Ejemplos

El métodoObject.create() necesita al menos un argumento y el métodoObject.setPrototypeOf() necesita al menos 2 argumentos.

js
var obj = Object.create();// TypeError: Object.create necesita al menos 1 argumento, pero ninguno fue aprovadvar obj = Object.setPrototypeOf({});// TypeError: Object.setPrototypeOf requires at least 2 arguments, but only 1 were passed

Puedes arreglar esto configurandonull como el prototipo, por ejemplo:

js
var obj = Object.create(null);var obj = Object.setPrototypeOf({}, null);

Ver también

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp