Skip to content

Commit

Permalink
Update javascript.md - removes repeated information
Browse files Browse the repository at this point in the history
Removes repeated information about object declarations.
  • Loading branch information
adeleke-akinade authored Jul 6, 2024
1 parent 656acd7 commit 68475cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wordpress-coding-standards/javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ Whitespace can easily accumulate at the end of a line – avoid this, as trailin

### Object Declarations

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:
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:

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.
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.

```javascript
// Preferred
Expand Down

0 comments on commit 68475cc

Please sign in to comment.