JavaScript trailingcomma

Internet Explorer does not support trailing commas:


X = {
    x: 1,
    y: 1,   // This is a trailing comma and will break on IE
} 

NetBeans will warn about these problems if (and only if) your targeted browser selection includes Internet Explorer.

Here are some blog entries referencing this problem. If anybody has more official references for this (or know about exact versions affected; This is a problem in all versions of IE up to version 7. IE 8 does allow trailing commas in arrays and object definitions, however only when in IE 8 strict mode I believe.

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo