Esta propiedad reemplaza a la propiedad obsoleta arguments.caller del objeto arguments.
This property replaces the obsolete arguments.caller property of the arguments object.
Hay 3 principales diferencias entre los parámetros rest y el objeto arguments
There are three main differences between rest parameters and the arguments object
Intentar acceder el objeto arguments fuera de la declaración de la función producirá un error.
Attempting to access the arguments object outside a function declaration results in an error.
Usando el objeto arguments, podemos llamar una función com más argumentos de los que estén formalmente declarados.
Using the arguments object, you can call a function with more arguments than it is formally declared to accept.
Diferencia entre los parámetros rest y el objeto arguments
Difference between rest parameters and the arguments object
Es posible invocar los argumentos de una función utilizando el objeto arguments.
You can refer to a function's arguments within the function by using the arguments object.
Puedes referirte a los argumentos de una función dentro de la misma, utilizando el objeto arguments.
You can refer to a function's arguments within the function by using the arguments object.
Puede usar arguments.length para determinar el número de argumentos pasados a la función, y luego procesar cada argumento usando el objeto arguments.
You can use arguments.length to determine the number of arguments passed to the function, and then process each argument by using the arguments object.
En la mayoría de los casos, el uso de parámetros rest es una buena alternativa al uso del objeto arguments
In most cases, using rest parameters is a good alternative to using an arguments object.
Los parámetros rest son solo los que no se les ha asignado un nombre, mientras que el objeto arguments contiene todos los argumentos pasados a la función
rest parameters are only the ones that haven't been given a separate name, while the arguments object contains all arguments passed to the function
El objeto arguments crea las funciones de getter y setter para sus propiedades, así como parámetros formales de la función.
The arguments object creates getter and setter functions for both its properties, as well as the function's formal parameters.
El objeto arguments se puede usar si se llama a la función con más argumentos de los que ésta formalmente declarada a aceptar.
You can use the arguments object if you call a function with more arguments than it is formally declared to accept.
Conținut posibil inadecvat
Exemplele au rolul de a te ajuta să traduci cuvinte sau expresii corect si adaptat la context. Nu sunt selectate sau validate manual, așadar pot conține termeni inadecvați. Te rugăm să raportezi exemplele pe care le consideri inadecvate. Traducerile vulgare sau colocviale sunt în general marcate cu roșu sau cu portocaliu.
Înregistrează-te pentru a accesa mai multe exemple