Returns the actual value of individual arguments from an arguments object returned by the arguments property of an executing function.
Syntax[ function . ] arguments[ [0|1|2|...| n ] ]
The following example illustrates the use of the 0 . . . n properties of the arguments object. To fully understand the example, pass one or more arguments to the function:
function ArgTest(){
var s = "";
s += "The individual arguments are: "
for (n = 0; n < arguments.length; n++){
s += ArgTest.arguments[n] ;
s += " ";
}
return(s);
}
document.write(ArgTest(1, 2, "hello", new Date()));
Remarks
The values returned by the 0 . . . n properties are the actual values passed to the executing function. While not actually an array of arguments, the individual arguments that comprise the arguments object are accessed the same way that array elements are accessed.
See also Other articles AttributionsMicrosoft Developer Network: Article
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4