Skip to content

Commit 3a27113

Browse files
authored
Update remainder.md
1 parent 8394fbb commit 3a27113

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

programming/operators/remainder.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ In mathematics, the **remainder** is the amount "left over" after performing som
44
For example, the remainder of `5 / 3` is `2`.
55

66
Many programming languages use the percentage sign (`%`) as an operator to calculate the remainder.
7-
For example, this is valid code in Javascript and Python:
7+
For example:
88
```javascript
99
5 % 3 == 2
1010
```
@@ -23,8 +23,6 @@ For example:
2323
-5 % -3 == -2
2424
```
2525

26-
Some languages use the `%` operator for the calculating the modulus, not the remainder.
26+
Some languages (such as Python) use the `%` operator for the calculating the modulus, not the remainder.
2727
This treats negative numbers differently.
2828
You can learn more about this [on Wikipedia](https://en.wikipedia.org/wiki/Modulo).
29-
30-

0 commit comments

Comments
 (0)