三元運算子
n % 2 == 0 ? trace("n is even!") : trace("n is odd!");
// Assigning the evaluated expression to a variable
var message = n % 2 == 0 ? "n is even!" : "n is odd!";
trace(message);
n % 2 == 0 ? trace("n is even!") : trace("n is odd!");
// Assigning the evaluated expression to a variable
var message = n % 2 == 0 ? "n is even!" : "n is odd!";
trace(message);