Using break and continue in Statement Blocks : break « Statement « Flash / Flex / ActionScript






Using break and continue in Statement Blocks

 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        var aTitles:Array = ["a", "b", "c"];
        
        for (var i:Number = 0; i < aTitles.length; i++){
          if(aTitles[i] == "a") {
            trace("Title found.");
            break;
          }
        }

    }
  }
}

        








Related examples in the same category

1.Use break statements to exit the switch statement after executing the actions under the matching case.