Created
May 6, 2013 09:47
-
-
Save amowu/5524250 to your computer and use it in GitHub Desktop.
Pass …args arguments to a function.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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