---
title: 'TypeError: More arguments needed'
slug: Web/JavaScript/Reference/Errors/More_arguments_needed
translation_of: Web/JavaScript/Reference/Errors/More_arguments_needed
---
<div>{{jsSidebar("Errors")}}</div>

<h2 id="Komunikat">Komunikat</h2>

<pre class="syntaxbox">TypeError: Object.create requires more than 0 arguments
TypeError: Object.setPrototypeOf requires more than 1 argument
TypeError: Object.defineProperties requires more than 0 arguments
</pre>

<h2 id="Typ_błędu">Typ błędu</h2>

<p>{{jsxref("TypeError")}}.</p>

<h2 id="Co_poszło_nie_tak">Co poszło nie tak?</h2>

<p>Błąd zaistniał w sposobie wywołania funkcji. Należy podać więcej argumentów.</p>

<h2 id="Przykłady">Przykłady</h2>

<p>Metoda {{jsxref("Object.create()")}} wymaga przynajmniej jednego argumentu a metoda {{jsxref("Object.setPrototypeOf()")}} wymaga przynajmniej dwóch:</p>

<pre class="brush: js example-bad">var obj = Object.create();
// TypeError: Object.create requires more than 0 arguments

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

<p>Możesz temu zaradzić ustawiając {{jsxref("null")}} jako prototyp, na przykład:</p>

<pre class="brush: js example-good">var obj = Object.create(null);

var obj = Object.setPrototypeOf({}, null);</pre>

<h2 id="Zobacz_również">Zobacz również</h2>

<ul>
 <li><a href="/en-US/docs/Web/JavaScript/Guide/Functions">Functions</a></li>
</ul>