Extracting Subsets of Array Elements : Splice : Array Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Array » Splice »

 

Extracting Subsets of Array Elements


 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){

        var aEmployeesAll:Array = ["A""P""C""H",
                                   "Gilberto""Mary""Ayla""Riad"];
        var aEmployeesExec:Array = aEmployeesAll.slice(04);
        var aEmployeesNew:Array = aEmployeesAll.slice(46);
        var aEmployeesStaff:Array = aEmployeesAll.slice(6);
        trace(aEmployeesExe.toString());
        trace(aEmployeesNew.toString());
        trace(aEmployeesStaff.toString());

    }
  }
}
A,P,C,H
G,M
A,R

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo Array
» Splice