← Back to release summary

Trailing comma in JavaScript function parameter lists

Category
JavaScript
Type
New or changed feature
Status
Enabled by default (Chrome 58)
Intent stage
None

Summary

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.

Standards & signals

View on chromestatus.com