Skip to content

Commit 67fe46f

Browse files
authored
Merge pull request #3279 from bogdanbacosca/if-else-bogdan
minor code formatting for 1-js/02-first-steps/10-ifelse/article.md
2 parents 746ad80 + 66ad8c1 commit 67fe46f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

1-js/02-first-steps/10-ifelse/article.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,9 @@ alert( message );
181181
It may be difficult at first to grasp what's going on. But after a closer look, we can see that it's just an ordinary sequence of tests:
182182

183183
1. The first question mark checks whether `age < 3`.
184-
2. If true -- it returns `'Hi, baby!'`. Otherwise, it continues to the expression after the colon '":"', checking `age < 18`.
185-
3. If that's true -- it returns `'Hello!'`. Otherwise, it continues to the expression after the next colon '":"', checking `age < 100`.
186-
4. If that's true -- it returns `'Greetings!'`. Otherwise, it continues to the expression after the last colon '":"', returning `'What an unusual age!'`.
184+
2. If true -- it returns `'Hi, baby!'`. Otherwise, it continues to the expression after the colon ":", checking `age < 18`.
185+
3. If that's true -- it returns `'Hello!'`. Otherwise, it continues to the expression after the next colon ":", checking `age < 100`.
186+
4. If that's true -- it returns `'Greetings!'`. Otherwise, it continues to the expression after the last colon ":", returning `'What an unusual age!'`.
187187

188188
Here's how this looks using `if..else`:
189189

0 commit comments

Comments
 (0)