I don't think V8 (the JavaScript engine used by NodeJS) supports array comprehensions yet, at least not according to this issue report. The V8 project member there seems to be saying that until they're actually standardized, they're not a priority.
Array comprehensions in NodeJS
-
17-01-2022 - |
Question
I heard somewhere that Node.JS has a lot of EcmaScript 6 features. It seems that array comprehensions are not there by default.
Does Node.JS have array comprehensions? If so, how can I enable them?
Solution
OTHER TIPS
You can use Spider-node... It's basically node, using mozila's spider monkey instead of google's v8.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow