Improve grammar in "Finding a Remainder in JavaScript"
parent
5820e60179
commit
b655064d97
|
@ -713,7 +713,7 @@
|
|||
"The <dfn>remainder</dfn> operator <code>%</code> gives the remainder of the division of two numbers.",
|
||||
"<strong>Example</strong>",
|
||||
"<blockquote>5 % 2 = 1 because<br>Math.floor(5 / 2) = 2 (Quotient)<br>2 * 2 = 4<br>5 - 4 = 1 (Remainder)</blockquote>",
|
||||
"<strong>Usage</strong><br>In mathematics, a number can be checked even or odd by checking the remainder of the division of the number by <code>2</code>.",
|
||||
"<strong>Usage</strong><br>In mathematics, a number can be checked to be even or odd by checking the remainder of the division of the number by <code>2</code>.",
|
||||
"<blockquote>17 % 2 = 1 (17 is Odd)<br>48 % 2 = 0 (48 is Even)</blockquote>",
|
||||
"<strong>Note</strong><br>The <dfn>remainder</dfn> operator is sometimes incorrectly referred to as the \"modulus\" operator. It is very similar to modulus, but does not work properly with negative numbers.",
|
||||
"<h4>Instructions</h4>",
|
||||
|
|
Loading…
Reference in New Issue