Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,19 @@
|
|||
package
|
||||
{
|
||||
public class ArrayCallback
|
||||
{
|
||||
public function main():void
|
||||
{
|
||||
var nums:Array = new Array(1, 2, 3);
|
||||
nums.map(function(n:Number, index:int, arr:Array):void { trace(n * n * n); });
|
||||
|
||||
// You can also pass a function reference
|
||||
nums.map(cube);
|
||||
}
|
||||
|
||||
private function cube(n:Number, index:int, arr:Array):void
|
||||
{
|
||||
trace(n * n * n);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue