diff options
| author | Florian Dieminger <me@fiji-flo.de> | 2021-02-11 18:26:59 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-11 18:26:59 +0100 |
| commit | 7a94b4d8daf297eda6df8e5cf933f7ba159bbc76 (patch) | |
| tree | c8c8a36c41beda7a4c150927b2b5c7d2a09837bd /files/pl/web/javascript/reference/global_objects/function/arguments/index.html | |
| parent | ab718192b92d5cc38c1114e055a435a6de7dd8ef (diff) | |
| parent | b8170f78422f2269dfc9df7760cc1ad51c048c00 (diff) | |
| download | translated-content-7a94b4d8daf297eda6df8e5cf933f7ba159bbc76.tar.gz translated-content-7a94b4d8daf297eda6df8e5cf933f7ba159bbc76.tar.bz2 translated-content-7a94b4d8daf297eda6df8e5cf933f7ba159bbc76.zip | |
Merge pull request #38 from fiji-flo/unslugging-pl
Unslugging pl
Diffstat (limited to 'files/pl/web/javascript/reference/global_objects/function/arguments/index.html')
| -rw-r--r-- | files/pl/web/javascript/reference/global_objects/function/arguments/index.html | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/files/pl/web/javascript/reference/global_objects/function/arguments/index.html b/files/pl/web/javascript/reference/global_objects/function/arguments/index.html new file mode 100644 index 0000000000..2730721c86 --- /dev/null +++ b/files/pl/web/javascript/reference/global_objects/function/arguments/index.html @@ -0,0 +1,42 @@ +--- +title: Function.arguments +slug: Web/JavaScript/Reference/Global_Objects/Function/arguments +tags: + - Dokumentacja_JavaScript + - Dokumentacje + - JavaScript + - Wszystkie_kategorie +translation_of: Web/JavaScript/Reference/Global_Objects/Function/arguments +original_slug: Web/JavaScript/Referencje/Obiekty/Function/arguments +--- +<p>{{JSRef}}{{ Deprecated_header() }}</p> + +<h2 id="Podsumowanie" name="Podsumowanie">Podsumowanie</h2> + +<p>Obiekt tablicopodobny odpowiadający argumentom przekazywanym funkcji.</p> + +<h2 id="Opis" name="Opis">Opis</h2> + +<p>Należy użyć obiektu <code><a href="pl/Dokumentacja_j%c4%99zyka_JavaScript_1.5/Funkcje/arguments">arguments</a></code> dostępnego wewnątrz funkcji zamiast <code>Function.arguments</code>.</p> + +<p>W przypadku rekurencji, tzn. jeśli funkcja <code>f</code> pojawia się kilkakrotnie na stosie wywołania, wartość of <code>f.arguments</code> reprezentuje argumenty odpowiadające ostatniemu wywołaniu funkcji.</p> + +<h2 id="Przyk.C5.82ad" name="Przyk.C5.82ad">Przykład</h2> + +<pre class="brush: js">function f(n) { g(n-1) } + +function g(n) { + console.log("przed: " + g.arguments[0]); + if(n>0) { f(n); } + console.log("po: " + g.arguments[0]); +} +f(2); +</pre> + +<p>wyświetli:</p> + +<pre class="eval">przed: 1 +przed: 0 +po: 0 +po: 1 +</pre> |
