Skip to content

Commit a0ff0f7

Browse files
committed
Improve documentation for object syntax
1 parent 3ec70ca commit a0ff0f7

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,22 @@ Objects are maps of key/value pairs ("properties"), where keys must be atoms:
7070
{ greeting: "Hello, World!" }
7171
```
7272

73-
Object properties without explicitly-written keys are automatically enumerated:
73+
Properties are delimited by whitespace and/or commas:
7474

7575
```
76-
{ Hello World } // is the same as { 0: Hello, 1: World }
76+
// These all mean the same thing:
77+
{
78+
a: 1
79+
b: 2
80+
}
81+
{ a: 1, b: 2 }
82+
{ a: 1 b: 2 }
83+
```
84+
85+
Properties without explicitly-written keys are automatically enumerated:
86+
87+
```
88+
{ a b } // is the same as { 0: a, 1: b }
7789
```
7890

7991
#### Lookups

0 commit comments

Comments
 (0)