Timeline for answer to Does JavaScript support array/list comprehensions like Python? by DRD
Current License: CC BY-SA 4.0
Post Revisions
17 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 20, 2021 at 14:25 | comment | added | ICW | It's very sad that list comprehensions were never added to the language. They're very nice to use and easy to read. Although, it's never too much effort to not use them. | |
| Jan 13, 2021 at 18:10 | comment | added | elPastor | In case anyone else stumbles over this answer many years later, this does NOT work as proven by the "example" provided in the link above. | |
| S Jan 4, 2021 at 3:33 | history | suggested | KTibow | CC BY-SA 4.0 |
Fix link to MDN
|
| Jan 3, 2021 at 23:21 | review | Suggested edits | |||
| S Jan 4, 2021 at 3:33 | |||||
| Nov 14, 2019 at 23:34 | history | edited | coldspeed95 | CC BY-SA 4.0 |
deleted 15 characters in body
|
| S Oct 20, 2019 at 12:23 | history | suggested | howMuchCheeseIsTooMuchCheese | CC BY-SA 4.0 |
added example with new syntax
|
| Oct 20, 2019 at 11:14 | review | Suggested edits | |||
| S Oct 20, 2019 at 12:23 | |||||
| S Sep 14, 2018 at 1:21 | history | suggested | Matt Kramer | CC BY-SA 4.0 |
Update to point out that comprehensions were removed from ES7
|
| Sep 13, 2018 at 21:06 | review | Suggested edits | |||
| S Sep 14, 2018 at 1:21 | |||||
| Mar 5, 2018 at 15:40 | review | Suggested edits | |||
| Mar 5, 2018 at 16:31 | |||||
| May 16, 2017 at 3:00 | vote | accept | A K | ||
| Nov 17, 2016 at 2:14 | comment | added | Ben Creasy | The MDN page developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/… says at the top: "The array comprehensions is non-standard, and it's unlikely to be added to ECMAScript". stackoverflow.com/questions/33872615/… seems to have more details | |
| Jul 11, 2015 at 4:23 | comment | added | DRD | Sure, see the update. @user2864740: it is as it is, but array comprehensions will be a part of ES7 and with Babel one can use it now. | |
| Jul 11, 2015 at 4:22 | history | edited | DRD | CC BY-SA 3.0 |
added 526 characters in body
|
| Jul 11, 2015 at 4:16 | comment | added | Michael Geary | Babel is great! Maybe you could expand your answer a bit and give an example of what the syntax would be, and how you can use Babel to use it in today's browsers. | |
| Jul 11, 2015 at 4:05 | comment | added | Michael Geary | I believe the OP was asking about JavaScript code that they can actually run today, not at some indefinite time in the future. | |
| Jul 11, 2015 at 3:58 | history | answered | DRD | CC BY-SA 3.0 |