Translation correction (#24258)
This commit is contained in:
committed by
Gregory Gubarev
parent
81d09bb6a0
commit
56b6cd4dc7
@ -18,9 +18,9 @@ const thing = (condition) ? <if true> : <if false>;
|
|||||||
const cappedInput = input > 50 ? 50 : input // this will cap the input at 50
|
const cappedInput = input > 50 ? 50 : input // this will cap the input at 50
|
||||||
```
|
```
|
||||||
|
|
||||||
### Еще раз, если
|
### Else if
|
||||||
|
|
||||||
Вы также можете связать троичные операторы, таким образом вы будете иметь поведение if-else if-else
|
Вы также можете сцеплять тернарные операторы, таким образом вы будете иметь поведение if-else if-else
|
||||||
|
|
||||||
```js
|
```js
|
||||||
<first condition> ? <value if first true>
|
<first condition> ? <value if first true>
|
||||||
@ -34,4 +34,4 @@ const wealth = housesOwned > 3 ? "rich"
|
|||||||
: housesOwned > 1 ? "nothing to complain"
|
: housesOwned > 1 ? "nothing to complain"
|
||||||
: "poor"
|
: "poor"
|
||||||
|
|
||||||
```
|
```
|
||||||
|
Reference in New Issue
Block a user