Add two number values in the middle of a string concatenation statement : Convert to String : Data Type Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Data Type » Convert to String »

 

Add two number values in the middle of a string concatenation statement


 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        var first:int 24;
        var second:int 42;
        
        var result:String = "There are " first + second " people";
        
        trace(result);
    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Data Type
» Convert to String