<div dir="ltr"><div><div><div>I hadn't noticed it and I know array comprehensions have started slipping into our code so it's worth noting that in Spidermonkey a proposed but never approved ES6 syntax for array comprehensions was implemented. Now ES7 has proposed a slightly different syntax which Spidermonkey also supports and we should probably prefer in new code. Specifically the order of the parts in the comprehension syntax has flipped:<br><br></div>Before: [x + 1 for (x of [1, 2, 3])]<br><br></div>After: [for (x of [1, 2, 3]) x + 1]<br><br></div><div>MDN has more examples: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Array_comprehensions">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Array_comprehensions</a><br><br></div>Reviewers and patch authors, please watch for this in new code you land or review.<br><br></div>