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 < someArray.length; i++)
- {
- someThing = someArray[i] as SomeClass;
- // Do stuff with someThing...
- }
- // Do this:
- someArray.forEach = _doSomething;
- private function _doSomething(element:*, index:int, arr:Array):void
- {
- var someThing:SomeClass = element as SomeClass;
- // Do stuff with someThing
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement