对象简介语法及对象新增 对象简介语法 let name = 'Strive'; let age = 18; let json ={ name, //name:name, age, //age:age /* showA:function(){ return this.name; } */ showA(){ return this.name; }, showB(){ return this.age; } }; console.log(json.showA(), json.showB()); 对象扩展运算符 let { x,y,...z} = { x : 1,y : 2,a : 3,b : ...