📜  javascript 三元 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:53.605000             🧑  作者: Mango

代码示例6
## Conditional (ternary) operator
#1 one condition
condition ? ifTrue : ifFalse;
#2 Multi conditions
condition1 ? value1
         : condition2 ? value2
         : condition3 ? value3
         : value4;