← Back to release summary

Generators (ES6)

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

Summary

A generator is a special type of function that works as a factory for iterators.

Standards & signals

Docs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator http://updates.html5rocks.com/2014/10/Generators-the-Gnarly-Bits

Samples: https://github.com/GoogleChrome/samples/tree/gh-pages/generators

View on chromestatus.com