📜  javascript 对象破坏 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:48.797000             🧑  作者: Mango

代码示例2
const employee = {name: ‘ANE01’, email: ‘Anna@example.com’, phone:’0112–345–6789'};
//with destucturing
const {name, email, phone} = employee;
//without destucturing
const name = employee.name;
const email = employee.email;
const phone = employee.phone;