break is a keyword that allows you to stop processing a loop or conditional. : For : Statement Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Statement » For »

 

break is a keyword that allows you to stop processing a loop or conditional.


 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        var needle:int 3;
        var haystack: Array = new Array(1,2,3,4,5,6);
        for (var i:int 0; i < haystack.length; i++) {
           if (!(hay == haystack[i])) { 
             continue
           }
           trace("I found the needle!");
           break;
        }
    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Statement
» For