← Back to release summary

Default parameters (ES6)

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

Summary

Allows formal parameters to be initialized with default values if no value (or 'undefined') is passed.

Standards & signals

Docs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters

Samples: https://googlechrome.github.io/samples/default-parameters-es6/index.html

View on chromestatus.com