如果不是,否則
if (a > b) {
trace("You win!");
} else if (a == b) {
trace("It's a draw!");
} else {
trace("You lose!");
}
// Assigning the evaluated expression to a variable
var message = if (a > b) {
"You win!";
} else if (a == b) {
"It's a draw!";
} else {
"You lose!";
}
trace(message);