Skip to content

Instantly share code, notes, and snippets.

@amowu
Created May 6, 2013 09:47
Show Gist options
  • Select an option

  • Save amowu/5524250 to your computer and use it in GitHub Desktop.

Select an option

Save amowu/5524250 to your computer and use it in GitHub Desktop.
Pass …args arguments to a function.
protected function fun1(...rest):void{
trace(rest);
}
protected function fun2(some:*, thing:*, here:*, ...rest):void{
var newArg:* = 1;
fun2.apply(null, [some, thing, here, newArg].concat(rest));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment