📅  最后修改于: 2022-03-11 14:55:53.243000             🧑  作者: Mango
let name = 'bob';let age = 34;let job = 'carpenter';// instead of thislet myObject1 = { name: name, age: age, job: job };// do thislet myObject2 = { name, age, job };console.log(myObject2);--> { name: 'bob', age: 34, job: 'carpenter' }