do while : Do while « Statement « Flash / Flex / ActionScript






do while

 

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

        var sum:Number = 10;
        do {
          sum += 40;
        } while (sum < 10);
        trace(sum + " - surpassed 10"); // Displays: 50 - surpassed 10
    }
  }
}

        








Related examples in the same category