Convert null to number : Type cast « Data Type « Flash / Flex / ActionScript






Convert null to number

 


package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        trace(int(null));
    }
  }
}

        








Related examples in the same category

1.Use int() method to convert float number to integer
2.Use int() method to convert boolean value to integer
3.Convert undefined to Number