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.

 

摘自 权威指南第六版 

相关文章:

  • 2021-07-31
  • 2021-07-07
  • 2021-10-22
  • 2021-12-10
  • 2021-06-01
  • 2021-10-07
  • 2022-12-23
  • 2021-07-19
猜你喜欢
  • 2021-09-30
  • 2021-05-29
  • 2022-12-23
  • 2022-12-23
  • 2022-01-22
  • 2021-08-01
相关资源
相似解决方案