Skip to content

Commit fce02e2

Browse files
committed
Fix |
1 parent 895129c commit fce02e2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/syntax-cheatsheet.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Here is the cheat sheet with some equivalents between JavaScript and Reason synt
2727
|-------------------------------------------------------|-----------------------------------|
2828
| `true`, `false` | Same |
2929
| `!true` | Same |
30-
| `||`, `&&`, `<=`, `>=`, `<`, `>` | Same |
30+
| `&&`, `<=`, `>=`, `<`, `>`, <code>&#124;&#124;</code> | Same |
3131
| `a === b`, `a !== b` | Same |
3232
| No deep equality (recursive compare) | `a == b`, `a != b` |
3333
| `a == b` | No equality with implicit casting |
@@ -58,7 +58,7 @@ Here is the cheat sheet with some equivalents between JavaScript and Reason synt
5858

5959
| JavaScript | Reason |
6060
|-----------------------|------------------------------------|
61-
| `[1, 2, 3]` | <code>\[\|1, 2, 3\|\]</code> |
61+
| `[1, 2, 3]` | <code>[&#124;1, 2, 3&#124;]</code> |
6262
| `myArray[1] = 10` | Same |
6363
| `[1, "Bob", true]` \* | `(1, "Bob", true)` |
6464
| No immutable list | `[1, 2, 3]` |
@@ -89,7 +89,7 @@ contain multiple types of elements.
8989
<thead>
9090
<tr>
9191
<th>JavaScript</th>
92-
<th>Reason th>
92+
<th>Reason</th>
9393
</tr>
9494
</thead>
9595
<tbody>
@@ -135,7 +135,7 @@ possible.
135135
| JavaScript | Reason |
136136
|-------------------------------|-----------------------------------------------|
137137
| `const {a, b} = data` | `let {a, b} = data` |
138-
| `const [a, b] = data` | <code>let \[\|a, b\|\] = data</code> \* |
138+
| `const [a, b] = data` | <code>let [&#124;a, b&#124;] = data</code> \* |
139139
| `const {a: aa, b: bb} = data` | `let {a: aa, b: bb} = data` |
140140

141141
\* This will cause the compiler to warn that not all cases are handled, because
@@ -166,7 +166,7 @@ instead.
166166
| JavaScript | Reason |
167167
|-------------------------------------------|----------------------------------------------|
168168
| `throw new SomeError(...)` | `raise(SomeError(...))` |
169-
| `try {a} catch (Err) {...} finally {...}` | <code>try (a) { \| Err =\> ...}</code> \* |
169+
| `try {a} catch (Err) {...} finally {...}` | <code>try (a) { &#124; Err =\> ...}</code> \*|
170170

171171
\* No finally.
172172

0 commit comments

Comments
 (0)