Object.assign/Object.keys/Object.values

  1. Object.assign

//输出结果:{id: 1, name: "张三", sex: "man", age: 18}

2.Object.keys


//输出结果:["id", "name", "sex", "age"]

3.Object.values


//输出结果:[1, "王麻子", "man", 50]

你可能感兴趣的:(Object.assign/Object.keys/Object.values)