From a55b575e8089ee6cab7c5c262a7e6db55d0e34d6 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 14:46:50 +0100 Subject: unslug es: move --- .../global_objects/function/arguments/index.html | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 files/es/web/javascript/reference/global_objects/function/arguments/index.html (limited to 'files/es/web/javascript/reference/global_objects/function/arguments/index.html') diff --git a/files/es/web/javascript/reference/global_objects/function/arguments/index.html b/files/es/web/javascript/reference/global_objects/function/arguments/index.html new file mode 100644 index 0000000000..f0f8f6ca90 --- /dev/null +++ b/files/es/web/javascript/reference/global_objects/function/arguments/index.html @@ -0,0 +1,44 @@ +--- +title: Function.arguments +slug: Web/JavaScript/Referencia/Objetos_globales/Function/arguments +translation_of: Web/JavaScript/Reference/Global_Objects/Function/arguments +--- +
{{JSRef("Objetos_globales", "Function")}} {{deprecated_header}}
+ +

Resumen

+ +

Un objeto de tipo arreglo correspondiente a los argumentos pasados a la función.

+ +

Descripción

+ +

Use el objeto arguments disponible dentro de las funciones en vez de Function.arguments.

+ +

Notas

+ +

En caso de recursividad, es decir, si la función f aparece varias veces en la pila de llamada, el valor de f.arguments representa los argumentos correspondientes a la invocación más reciente de la función.

+ +

Ejemplo

+ +
function f(n) { g(n-1) }
+function g(n) {
+  print("antes: " + g.arguments[0]);
+  if(n>0)
+    f(n);
+  print("después: " + g.arguments[0]);
+}
+f(2)
+
+ +

resultados:

+ +
antes: 1
+antes: 0
+después: 0
+después: 1
+
+ +

 

+ +
 
+ +

{{ languages( { "en": "en/Core_JavaScript_1.5_Reference/Global_Objects/Function/arguments", "pl": "pl/Dokumentacja_j\u0119zyka_JavaScript_1.5/Obiekty/Function/arguments" } ) }}

-- cgit v1.2.3-54-g00ecf