check an item's datatype using the is operator : is « Statement « Flash / Flex / ActionScript






check an item's datatype using the is operator

 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        var quantity:int = 5;
        if (quantity is int) {
          trace("Yippee. It's an integer.");
        }
    }
  }
}

        








Related examples in the same category