nodejs 对 es6 支持情况怎么样

2025-05-23 06:56:52
推荐回答(2个)
回答1:

```A
import fortune from 'fortune'
import http from 'http'

const app = fortune.create()
const server = http.createServer(fortune.net.http(app))
```
写起来跟python差不多。

回答2:

可以通过这个命令查看支持情况:

node --v8-options | grep harmony