Logical Operators in Actionscript : Logical Operators : Language Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Language » Logical Operators »

 

Logical Operators in Actionscript


 

Operator      Name 
&&            And 
||            Or 
!             Not 


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

        var sUsername:String = "Joe";
        var sPassword:String = "oass";
        
        if (sUsername == "Joey"){
          if (sPassword == "isAwesome"){
            trace("That is the correct username and password.");
          }
        }
        if (sUsername == "Joey" && sPassword == "isAwesome"){
          trace("That is the correct username and password.");
        }
    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Language
» Logical Operators