Ending a while Loop with the break Statement : While : Statement Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Statement » While »

 

Ending a while Loop with the break Statement


 

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

        var address = "me@moock.org";
        var isValidAddress = false;
        var i = 0;
        
        while (i < address.length) {
          if (address.charAt(i== "@") {
            isValidAddress = true;
            break;
          }
          i++;
        }
    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Statement
» While