Working with a Subset of Your Array with slice() : Slice : Array Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Array » Slice »

 

Working with a Subset of Your Array with slice()


 

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

        var metals:Array = ["iron""copper""gold""silver","platinum""tin""chrome"];
        var preciousMetals:Array = metals.slice(2,5);
        trace(preciousMetals)// Displays: gold,silver,platinum

    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Array
» Slice