You can use the arguments array if you call a function with more arguments than it is formally declared to accept.
Możesz użyć obiektu arguments, jeśli funkcja wywołana jest z większą liczbą argumentów niż zostało to zadeklarowane.
Each formal argument of a function is a property of the arguments array. For example, if a function myFunc has two arguments named arg1 and arg2, you can refer to the arguments as arguments.arg1 and arguments.arg2.
Na przykład, jeżeli funkcja myFunc posiada dwa argumenty o nazwie arg1 i arg2, możesz odwołać się do nich jako arguments.arg1 i arguments.arg2 (możesz także odwołać się do tych argumentów poprzez arguments i arguments).
In addition to being available as a local variable, the arguments array is also a property of the Function object and can be preceded by the function name.
Oprócz dostępności jako zmienna lokalna, obiekt arguments jest również własnością obiektu Function i może być poprzedzony nazwą funkcji.
You can use arguments.length to determine the number of arguments passed to the function, and then process each argument by using the arguments array. (To determine the number of arguments declared when a function was defined, use the Function.length property.)
Aby określić liczbę argumentów przekazywanych do funkcji można użyć własności arguments.length, a następnie skorzystać z każdego z argumentów używając obiektu arguments (aby określić liczbę argumentów zadeklarowanych podczas definiowania funkcji, skorzystać można z własności Function.length).
JavaScript 1.3: deprecated arguments.caller property; removed support for argument names and local variable names as properties of the arguments array.
JavaScript 1.3: wycofywana własność arguments.caller; usunięto obsługę nazw argumentów oraz zmiennych lokalnych jako własności obiektu arguments.
Potentially sensitive or inappropriate content
Examples are used only to help you translate the word or expression searched in various contexts. They are not selected or validated by us and can contain inappropriate terms or ideas. Please report examples to be edited or not to be displayed. Potentially sensitive, inappropriate or colloquial translations are usually marked in red or in orange.
No results found for this meaning.
Synonyms and analogies of "the arguments array" in English