Return to Snippet

Revision: 61906
at January 23, 2013 18:18 by heathbo


Initial Code
testfunction("test1","test2","test3","test4")


function testfunction(...testValues)
{
  var values:Array = new Array();
  values = testValues;

  trace(testValues[2]);
};

Initial URL


Initial Description
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.

Initial Title
Pass in an varying number of parameters.

Initial Tags


Initial Language
ActionScript 3