Say I have two functions that expect ...rest parameters
private function a(...myParams):void
{
trace(myParams.length); // returns 3 parameters 1,2,3
b(myParams);
}
private function b(...myParams):void
{
trace(myParams.length); // returns 1 parameter (array) [1,2,3]
}
a(1,2,3);
The function a gets an array of parameters 1,2,3 but when it passes them to function b, it passes them as 1 parameter (an array containing the 3). Is there a way to pass them as 3 separate parameters instead of an array?