up
This commit is contained in:
parent
83b93e5992
commit
9ad9063d00
742 changed files with 884 additions and 779 deletions
16
1-js/02-first-steps/10-ifelse/5-rewrite-if-question/task.md
Normal file
16
1-js/02-first-steps/10-ifelse/5-rewrite-if-question/task.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
importance: 5
|
||||
|
||||
---
|
||||
|
||||
# Rewrite 'if' into '?'
|
||||
|
||||
Rewrite this `if` using the ternary operator `'?'`:
|
||||
|
||||
```js
|
||||
if (a + b < 4) {
|
||||
result = 'Below';
|
||||
} else {
|
||||
result = 'Over';
|
||||
}
|
||||
```
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue