Use an array in a situation in which a string is required, Flash automatically calls the toString( ) method : join « Array « Flash / Flex / ActionScript






Use an array in a situation in which a string is required, Flash automatically calls the toString( ) method

 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        var letters:Array = ["a", "b", "c"];
        trace(letters);  // Displays: a,b,c
    }
  }
}

        








Related examples in the same category

1.Converting Arrays to Lists
2.With join() you can use any delimiter you want
3.Converting an Array to a String: Use the join( ) method.
4.Without a delimiter, Flash uses a comma by default
5.Join object array