Skip to content
This repository was archived by the owner on Sep 12, 2022. It is now read-only.

Commit 7499dc7

Browse files
committed
Added example of strings starting with a number and a space
1 parent 11614b5 commit 7499dc7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ If your editor/IDE isn't listed above, a list of available plugins can be found
153153
};
154154
```
155155

156-
- Don't use quotes around keys
156+
- Don't use quotes around keys unless keys contain spaces (should be avoided at all costs) or start with numbers
157157
```javascript
158158
// bad
159159
var superman = {
@@ -164,6 +164,11 @@ If your editor/IDE isn't listed above, a list of available plugins can be found
164164
var superman = {
165165
type: 'alien'
166166
};
167+
168+
// good
169+
var superman = {
170+
'6thSense': 'bruce willis was dead the whole time'
171+
};
167172
```
168173
169174
**[⬆ back to top](#table-of-contents)**

0 commit comments

Comments
 (0)