Skip to content

Commit 68475cc

Browse files
Update javascript.md - removes repeated information
Removes repeated information about object declarations.
1 parent 656acd7 commit 68475cc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

wordpress-coding-standards/javascript.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ Whitespace can easily accumulate at the end of a line – avoid this, as trailin
5151

5252
### Object Declarations
5353

54-
Object declarations can be made on a single line if they are short (remember the line length guidelines). When an object declaration is too long to fit on one line, there must be one property per line. Property names only need to be quoted if they are reserved words or contain special characters:
54+
Object declarations can be made on a single line if they are short (remember the line length guidelines). When an object declaration is too long to fit on one line, there must be one property per line, and each line must be ended by a comma. Property names only need to be quoted if they are reserved words or contain special characters:
5555

56-
Objects and arrays can be declared on a single line if they are short (remember the line length guidelines). When an object or array is too long to fit on one line, each member must be placed on its own line and each line ended by a comma.
56+
Arrays can be declared on a single line if they are short (remember the line length guidelines). When an array is too long to fit on one line, each member must be placed on its own line and each line ended by a comma.
5757

5858
```javascript
5959
// Preferred

0 commit comments

Comments
 (0)