Skip to content

Commit 9266d74

Browse files
authored
Merge pull request #197 from kevanstannard/syntax-lookup-mod-operator
Add syntax lookup mod operator
2 parents 6da8fa6 + da8a0b6 commit 9266d74

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

misc_docs/syntax/operators_mod.mdx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
id: "mod"
3+
keywords: ["mod", "modulo", "operator"]
4+
name: "mod"
5+
summary: "This is the `modulo` operator."
6+
category: "operators"
7+
---
8+
9+
The `mod` operator calculates the *modulo* (remainder after division) of two integers.
10+
11+
### Example
12+
13+
<CodeTab labels={["ReScript", "JS Output"]}>
14+
15+
```res
16+
let result = mod(7, 4)
17+
```
18+
19+
```js
20+
var result = 3;
21+
```
22+
23+
</CodeTab>
24+
25+

0 commit comments

Comments
 (0)