SOURCE

let name = "tom",
age = 17;
let sayHello = () => console.log("hello...");
let user = {
  name,
  age,
  sayHello,
  something: "something"
}
console.log("user", user);

let user2 = {
  name:"user2 name",
  ...user
}
console.log("user2", user2);

user2 = {
  ...user,
  name:"user2 name"//调整顺序的区别
}
console.log("user2 again", user2);
console 命令行工具 X clear

                    
>
console