3 ms·
The other thing is that JSON scoffs at trailing comma (both in object and array literals), while JavaScript engines are perfectly happy to accept them.
by Xion 14y ago
The other thing is that JSON scoffs at trailing comma (both in object and array literals), while JavaScript engines are perfectly happy to accept them.
- troels 14y agoNot all of them are. IE6 will choke.
- martin-adams 14y agoAnd IE7, and IE8.
- masklinn 14y agoIE8 (maybe IE7 as well, not sure anymore) will accept trailing commas in objects. All IE will also "accept" trailing commas in arrays, but they will create a final `undefined` element