I have a few functions that accept several parameters.
public function somefunc(param1:String, param2:String, param3:String):void{
}
Is there a way to loop through all the params (without knowing how many or their names) and put them in some kind of an array with their names, so I’d get an associative array
[
param1: "value 1"
param2: "value 2"
param3: "value 3"
]
The object arguments stores a function’s arguments and you can use the
lengthproperty to get the number of arguments. However it does not provide the names of the arguments, i.e. it won’t provide namesparam1, param2etc. It will only provide the values of them.