fix typo in chaining if/else statements Waypoint
parent
2bd4e2eede
commit
7bb3f6c702
|
@ -2777,7 +2777,7 @@
|
|||
"title": "Chaining If Else Statements",
|
||||
"description": [
|
||||
"<code>if/else</code> statements can be chained together for complex logic. Here is <dfn>pseudocode</dfn> of multiple chained <code>if</code> / <code>else if</code> statements:",
|
||||
"<blockquote>if(<em>condition1</em>) {<br> <em>statement1</em><br>} else if (<em>condition1</em>) {<br> <em>statement1</em><br>} else if (<em>condition3</em>) {<br> <em>statement3</em><br>. . .<br>} else {<br> <em>statementN</em><br>}</blockquote>",
|
||||
"<blockquote>if(<em>condition1</em>) {<br> <em>statement1</em><br>} else if (<em>condition2</em>) {<br> <em>statement2</em><br>} else if (<em>condition3</em>) {<br> <em>statement3</em><br>. . .<br>} else {<br> <em>statementN</em><br>}</blockquote>",
|
||||
"<h4>Instructions</h4>",
|
||||
"Write chained <code>if</code>/<code>else if</code> statements to fulfill the following conditions:",
|
||||
"<code>num < 5</code> - return \"Tiny\"<br><code>num < 10</code> - return \"Small\"<br><code>num < 15</code> - return \"Medium\"<br><code>num < 20</code> - return \"Large\"<br><code>num >= 20</code> - return \"Huge\""
|
||||
|
@ -5141,4 +5141,4 @@
|
|||
"isBeta": "true"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue