Skip to content

Commit 5e441dd

Browse files
committed
Update syntax page
1 parent a04298c commit 5e441dd

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

docs/syntax-cheatsheet.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,15 @@
22
title: Syntax Cheatsheet
33
---
44

5-
We've worked very hard to make Reason look like JS while preserving OCaml's great semantics & types. Hope you enjoy it!
6-
7-
## Let Binding
5+
## Variable
86

97
| JavaScript | Reason |
108
| ----------------------- | ------------------------------ |
119
| `const x = 5;` | `let x = 5;` |
1210
| `var x = y;` | No equivalent (thankfully) |
1311
| `let x = 5; x = x + 1;` | `let x = ref(5); x := x^ + 1;` |
1412

15-
## String & Char
13+
## String & Character
1614

1715
| JavaScript | Reason |
1816
| ---------------------- | --------------------- |
@@ -49,13 +47,11 @@ We've worked very hard to make Reason look like JS while preserving OCaml's grea
4947
| JavaScript | Reason |
5048
| ------------------- | --------------------------------------- |
5149
| no static types | `type point = {x: int, mutable y: int}` |
52-
| `{x: 30, y: 20}` | Same \* |
50+
| `{x: 30, y: 20}` | Same |
5351
| `point.x` | Same |
5452
| `point.y = 30;` | Same |
5553
| `{...point, x: 30}` | Same |
5654

57-
\* This is the Reason spiritual equivalent; it doesn't mean it compiles to JS' object! To compile to the latter, see [here](object.md#tip-tricks).
58-
5955
## Array
6056

6157
| JavaScript | Reason |

0 commit comments

Comments
 (0)