ECMAScript 5 与 ECMAScript 3 的一个小区别

In ECMAScript 5 (and some ECMAScript 3 implementations), reserved words may be
used as property names without quoting. In general, however, property names that are
reserved words must be quoted in ECMAScript 3. In ECMAScript 5, a trailing comma
following the last property in an object literal is ignored. Trailing commas are ignored
in most ECMAScript 3 implementations, but IE considers them an error.

 

摘自 权威指南第六版 

posted on 2011-11-20 23:23  argb  阅读(1536)  评论(0编辑  收藏  举报

导航