Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Instead of...
- var someThing:SomeClass;
- for (var i:Number = 0; i < someVector.length; i++)
- {
- someThing = someVector[i];
- // Do stuff with someThing...
- }
- // Do this:
- someVector.forEach = _doSomething;
- private function _doSomething(element:SomeClass, index:int, vector:Vector.<SomeClass>):void
- {
- // Do stuff with element:SomeClass
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement