From de5c456ebded0e038adbf23db34cc290c8829180 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 14:49:24 +0100 Subject: unslug pl: move --- .../global_objects/function/arguments/index.html | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 files/pl/web/javascript/reference/global_objects/function/arguments/index.html (limited to 'files/pl/web/javascript/reference/global_objects/function/arguments/index.html') 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..abbb63eef4 --- /dev/null +++ b/files/pl/web/javascript/reference/global_objects/function/arguments/index.html @@ -0,0 +1,41 @@ +--- +title: Function.arguments +slug: Web/JavaScript/Referencje/Obiekty/Function/arguments +tags: + - Dokumentacja_JavaScript + - Dokumentacje + - JavaScript + - Wszystkie_kategorie +translation_of: Web/JavaScript/Reference/Global_Objects/Function/arguments +--- +

{{JSRef}}{{ Deprecated_header() }}

+ +

Podsumowanie

+ +

Obiekt tablicopodobny odpowiadający argumentom przekazywanym funkcji.

+ +

Opis

+ +

Należy użyć obiektu arguments dostępnego wewnątrz funkcji zamiast Function.arguments.

+ +

W przypadku rekurencji, tzn. jeśli funkcja f pojawia się kilkakrotnie na stosie wywołania, wartość of f.arguments reprezentuje argumenty odpowiadające ostatniemu wywołaniu funkcji.

+ +

Przykład

+ +
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);
+
+ +

wyświetli:

+ +
przed: 1
+przed: 0
+po: 0
+po: 1
+
-- cgit v1.2.3-54-g00ecf