nullish node 14 vs 13

❯ node
Welcome to Node.js v13.12.0.
Type ".help" for more information.
> const a = null ?? 1
const a = null ?? 1
                ^

Uncaught SyntaxError: Unexpected token '?'
❯ node
Welcome to Node.js v14.2.0.
Type ".help" for more information.
> const a = null ?? 1
undefined
> a
1

つかえたー

べんりだった(nodenvにnodenv自身のupdateコマンドを追加する)

最終更新

役に立ちましたか?