Opera 9.25 vs Safari JavaScript syntax error forgiveness

The following definition of an Array works without problems in Safari (and probably Firefox too), but triggers an (legitimate) error in Opera 9.25:

var myArray = [

 1.2,

 2.3,

 3.4,

];

The error is triggered by the superfluous comma after the last element of the Array. It may be argued for both behaviors, but I would prefer all Browsers accepting such an Array definition also since in other languages (C, Python, PHP) such a redundant comma does not cause any trouble.

blog comments powered by Disqus