Performing Complex Conditional Testing
package{
import flash.display.Sprite;
public class Main extends Sprite{
public function Main(){
// Use the logical AND (&&), OR (||), and NOT (!) operators to create compound conditional statements.
var current:Date = new Date( );
if (current.getDate( ) == 17 && current.getMonth( ) == 3) {
trace ("Happy Birthday, Bruce!");
}
}
}
}
Related examples in the same category