Trailing comma in JavaScript function parameter lists

A small modification to JavaScript syntax allows trailing comma in formal parameter lists and in argument lists. For example, all the following become valid: function f(a, b,) { return a + b } let g = (a, b,) => a + b f(1, 2,) + g(3, 4,) This is expected to be available by default in Chrome 58.

Specification

Editor's draft

Status in Chromium

Blink


Enabled by default (tracking bug) in:

  • Chrome for desktop release 58
  • Chrome for Android release 58
  • Android WebView release 58
  • Opera release 45
  • Opera for Android release 45

Consensus & Standardization

  • In development
  • Shipped
  • In development
  • No signals

Owner

Last updated on 2017-06-14