Array/generator comprehension support has been removed

Published: | Categories: JavaScript

Description

The support for array comprehensions and generator comprehensions has been removed with Firefox 58. Those were originally introduced with JavaScript 1.7 and 1.8, and later proposed as part of the ECMAScript 2015 draft that replaced the legacy, non-standard syntaxes, but the newer syntaxes also failed to be standardized. Because both were not implemented by any other browsers, the compatibility risk should be very low.

Array comprehensions can be replaced with the Array.prototype.map and filter methods. Generator comprehensions can also be replaced with generator functions.

References