Enhancement: add pipe symbol explanation (#14035)

pull/13920/merge
Zixu Zhao 2017-03-22 01:04:51 -04:00 committed by Quincy Larson
parent 8b23b1a887
commit b7173c29ce
1 changed files with 1 additions and 0 deletions

View File

@ -3372,6 +3372,7 @@
"title": "Comparisons with the Logical Or Operator",
"description": [
"The <dfn>logical or</dfn> operator (<code>||</code>) returns <code>true</code> if either of the <dfn>operands</dfn> is <code>true</code>. Otherwise, it returns <code>false</code>.",
"The <dfn>logical or</dfn> operator is composed of two pipe symbols (<code>|</code>). This can typically be found between your Backspace and Enter keys.",
"The pattern below should look familiar from prior waypoints:",
"<blockquote>if (num > 10) {<br> return \"No\";<br>}<br>if (num < 5) {<br> return \"No\";<br>}<br>return \"Yes\";</blockquote>",
"will return \"Yes\" only if <code>num</code> is between <code>5</code> and <code>10</code> (5 and 10 included). The same logic can be written as:",