【发布时间】:2020-07-22 21:40:50
【问题描述】:
基本上我有以下问题:
if condition A & B are true ->. do thing A
if only condition A is true -> do thing B
else -> do thing C
我试过这个:
const myThing = conditionA ? conditionB ? thingA :
conditionA ? thingB : thingC;
它不喜欢语法,但我不确定它有什么问题。
【问题讨论】:
-
condition A & B are true那是conditionA && conditionB ? thingA不是conditionA ? conditionB ? thingA
标签: javascript reactjs conditional-operator