Es6's unfold operator code does not run

let first = { a: "1", b: "2" }, second = { b: "3", c: "4" };
let third = { ...first, ...second };
console.log(third);

Code as above, run the instruction: babel-node js.js, and the error message is as follows:

clipboard.png

what went wrong?

Es6
Mar.17,2021

babelrc is not configured
https://babeljs.io/docs/plugi.


babel-node --presets env js.js
Menu