You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-3Lines changed: 31 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@
17
17
1.[Blocks](#blocks)
18
18
1.[Comments](#comments)
19
19
1.[Whitespace](#whitespace)
20
-
1.[Leading Commas](#leading-commas)
20
+
1.[Commas](#commas)
21
21
1.[Semicolons](#semicolons)
22
22
1.[Type Casting & Coercion](#type-coercion)
23
23
1.[Naming Conventions](#naming-conventions)
@@ -802,9 +802,9 @@
802
802
803
803
**[[⬆]](#TOC)**
804
804
805
-
## <a name='leading-commas'>Leading Commas</a>
805
+
## <a name='commas'>Commas</a>
806
806
807
-
-**Nope.**
807
+
-Leading commas:**Nope.**
808
808
809
809
```javascript
810
810
// bad
@@ -834,6 +834,34 @@
834
834
};
835
835
```
836
836
837
+
- Additional trailing comma:**Nope.** This can cause problems withIE6/7 and IE9if it's in quirksmode. Also, in some implementations of ES3 would add length to an array if it had an additional trailing comma. This was clarified in ES5 ([source](http://es5.github.io/#D)):
838
+
839
+
> Edition 5 clarifies the fact that a trailing comma at the end of an ArrayInitialiser does not add to the length of the array. This is not a semantic change from Edition 3 but some implementations may have previously misinterpreted this.
0 commit comments