/ Published in: ActionScript 3

This allows a varying amount of parameters to be passed into a function. Which is helpful if the amount of parameters passed in could change.
The trace in this example returns test3.
The trace in this example returns test3.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
testfunction("test1","test2","test3","test4") function testfunction(...testValues) { var values:Array = new Array(); values = testValues; trace(testValues[2]); };
Comments
