Hacker News new | ask | show | jobs
by creatio 4385 days ago
Anyone know if array comprehensions are also supported in chrome?
2 comments

    var xs = 1, 2, 3
    [for (x of xs) x * 2]
    SyntaxError: Unexpected token for
Chrome Version 35.0.1916.114
Not yet. Looks like only Firefox 30+ supports array and generator comprehensions:

http://kangax.github.io/compat-table/es6/#Array_comprehensio...