Skip to content

Commit 9469e94

Browse files
committed
Add guideline for spaces around operators
1 parent 745cf85 commit 9469e94

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

+12
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,7 @@
745745
∙∙var name;
746746
}
747747
```
748+
748749
- Place 1 space before the leading brace.
749750

750751
```javascript
@@ -770,6 +771,17 @@
770771
breed: 'Bernese Mountain Dog'
771772
});
772773
```
774+
775+
- Set off operators with spaces.
776+
777+
```javascript
778+
// bad
779+
var x=y+5;
780+
781+
// good
782+
var x = y + 5;
783+
```
784+
773785
- Place an empty newline at the end of the file.
774786

775787
```javascript

0 commit comments

Comments
 (0)